1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-11-23 22:24:39 +02:00

fix: bump to latest dclark/regexp2

Fixes #805
This commit is contained in:
Alec Thomas
2023-09-09 11:46:02 +10:00
parent a242abf7af
commit 4dd2cbef84
26 changed files with 542 additions and 166 deletions

View File

@@ -332,7 +332,7 @@ func (r *RegexLexer) maybeCompile() (err error) {
pattern = "(?" + rule.flags + ")" + pattern
}
pattern = `\G` + pattern
rule.Regexp, err = regexp2.Compile(pattern, regexp2.RE2)
rule.Regexp, err = regexp2.Compile(pattern, 0)
if err != nil {
return fmt.Errorf("failed to compile rule %s.%d: %s", state, i, err)
}