We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e596dad commit e17628aCopy full SHA for e17628a
src/libs/cursorless-engine/tokenizer/tokenizer.ts
@@ -42,7 +42,10 @@ const FIXED_TOKENS = [
42
43
export const IDENTIFIER_WORD_REGEXES = ["\\p{L}", "\\p{M}", "\\p{N}"];
44
const SINGLE_SYMBOLS_REGEX = "[^\\s\\w]";
45
-const NUMBERS_REGEX = "(?<=[^.\\d]|^)\\d+\\.\\d+(?=[^.\\d]|$)"; // (not-dot/digit digits dot digits not-dot/digit)
+// Accepts digits dot digits if not preceded or followed by a digit or dot. The
46
+// negative lookahed / lookbehind are to prevent matching numbers in semantic
47
+// versions (eg 1.2.3)
48
+const NUMBERS_REGEX = "(?<![.\\d])\\d+\\.\\d+(?![.\\d])";
49
50
interface Matcher {
51
tokenMatcher: RegExp;
0 commit comments