diff --git a/package.json b/package.json index 68e8ad51..470f53dc 100644 --- a/package.json +++ b/package.json @@ -279,7 +279,7 @@ "watch-tests": "tsc -p . -w --outDir out", "pretest": "npm run compile-tests && npm run compile && npm run compile-standalone && npm run lint", "check-types": "npm run protos && tsc --noEmit", - "lint": "eslint src --ext ts && eslint webview-ui/src --ext ts", + "lint": "eslint src --ext ts && eslint webview-ui/src --ext ts && cd webview-ui && npm run lint", "format": "prettier . --check", "format:fix": "prettier . --write", "test": "npm-run-all test:unit test:integration", diff --git a/webview-ui/src/utils/slash-commands.ts b/webview-ui/src/utils/slash-commands.ts index a7f155a0..8ab5f96a 100644 --- a/webview-ui/src/utils/slash-commands.ts +++ b/webview-ui/src/utils/slash-commands.ts @@ -75,9 +75,9 @@ export function getWorkflowCommands( // Regex for detecting slash commands in text // currently doesn't allow whitespace inside of the filename -export const slashCommandRegex = /\/([a-zA-Z0-9_\.-]+)(\s|$)/ +export const slashCommandRegex = /\/([a-zA-Z0-9_.-]+)(\s|$)/ export const slashCommandRegexGlobal = new RegExp(slashCommandRegex.source, "g") -export const slashCommandDeleteRegex = /^\s*\/([a-zA-Z0-9_\.-]+)$/ +export const slashCommandDeleteRegex = /^\s*\/([a-zA-Z0-9_.-]+)$/ /** * Removes a slash command at the cursor position