Skip to content

Conversation

SeanBarker182
Copy link
Contributor

No description provided.

@SeanBarker182 SeanBarker182 marked this pull request as draft September 25, 2025 21:04
return shortcut
.replace(/cmd/gi, "Ctrl")
.replace(/shift/gi, "Shift")
.replace(/\+/g, "+")

Check warning

Code scanning / CodeQL

Replacement of a substring with itself Medium

This replaces '+' with itself.

Copilot Autofix

AI 18 days ago

To fix this issue, simply remove the redundant line .replace(/\+/g, "+") from the formatShortcut function in app/components/Menu/MenuDropdownItem.tsx. Removing this will not affect the logic, as the split and map steps will still operate as needed. No further changes, imports, or method updates are required.

Suggested changeset 1
app/components/Menu/MenuDropdownItem.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/app/components/Menu/MenuDropdownItem.tsx b/app/components/Menu/MenuDropdownItem.tsx
--- a/app/components/Menu/MenuDropdownItem.tsx
+++ b/app/components/Menu/MenuDropdownItem.tsx
@@ -94,7 +94,6 @@
   return shortcut
     .replace(/cmd/gi, "Ctrl")
     .replace(/shift/gi, "Shift")
-    .replace(/\+/g, "+")
     .split("+")
     .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
     .join("+")
EOF
@@ -94,7 +94,6 @@
return shortcut
.replace(/cmd/gi, "Ctrl")
.replace(/shift/gi, "Shift")
.replace(/\+/g, "+")
.split("+")
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
.join("+")
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant