irongit

A Regex file extension that makes it way easier to edit large regex.

installable

huncholanehuncholaneauthored
parent 43173b6commit 6a24297d2ba032b071be953b45dbb7fa2d4cba5eBrowse files

2 files changed, +3 -1

+3-0src/highlighter.ts
@@ -119,6 +119,9 @@ class Highlighter {
119119 if (i >= maxMatches) {
120120 break;
121121 }
122+ if (match.index === undefined) {
123+ continue;
124+ }
122125 const start = document.positionAt(match.index);
123126 const end = document.positionAt(match.index + match[0].length);
124127 this.updateOrCreateHighlightGroup(match[0], new vscode.Range(start, end));
+0-1src/regexButtons.ts
@@ -1,6 +1,5 @@
11 import * as vscode from "vscode";
22 import { getConfig } from "./global";
3-import { output } from "./output";
43 import { highlighter } from "./highlighter";
54
65 type FlagChar = "g" | "i" | "m" | "s" | "u" | "y" | "x";