A Regex file extension that makes it way easier to edit large regex.
installable
2 files changed, +3 -1
+3-0src/highlighter.ts
| @@ -119,6 +119,9 @@ class Highlighter { | ||
| 119 | 119 | if (i >= maxMatches) { |
| 120 | 120 | break; |
| 121 | 121 | } |
| 122 | + if (match.index === undefined) { | |
| 123 | + continue; | |
| 124 | + } | |
| 122 | 125 | const start = document.positionAt(match.index); |
| 123 | 126 | const end = document.positionAt(match.index + match[0].length); |
| 124 | 127 | this.updateOrCreateHighlightGroup(match[0], new vscode.Range(start, end)); |
+0-1src/regexButtons.ts
| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | import * as vscode from "vscode"; |
| 2 | 2 | import { getConfig } from "./global"; |
| 3 | -import { output } from "./output"; | |
| 4 | 3 | import { highlighter } from "./highlighter"; |
| 5 | 4 | |
| 6 | 5 | type FlagChar = "g" | "i" | "m" | "s" | "u" | "y" | "x"; |