Skip to content

Commit

Permalink
add empty group when testing mode regexps to match the actual usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwing committed Jan 30, 2025
1 parent 357a986 commit 71c3ae2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mode/_test/highlight_rules_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ function checkBacktracking(tokenizer) {
var regex = rule.regex;
if (regex && typeof regex != "string") regex = regex.source;
if (!regex) return;
regex = "(" + regex + ")|";

Check warning on line 332 in src/mode/_test/highlight_rules_test.js

View check run for this annotation

Codecov / codecov/patch

src/mode/_test/highlight_rules_test.js#L332

Added line #L332 was not covered by tests
var result = require("recheck").checkSync(regex, "gmi", {
checker: "automaton",
timeout: 100000
Expand Down

0 comments on commit 71c3ae2

Please sign in to comment.