We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
An unterminated heredoc in Raku causes chroma to panic.
To Reproduce
--- a/lexers/testdata/raku.actual +++ b/lexers/testdata/raku.actual @@ -495,6 +495,8 @@ say Calculator.parse('2 + 3', actions => Calculations).made; put Date.today.later(:2years).year; +say q:to/Foo/; + =finish C<say> Date.today.year; # Output: 2020
$ go test -run ^TestLexers$ ./lexers --- FAIL: TestLexers (13.90s) --- FAIL: TestLexers/Raku/testdata/raku.actual (4.86s) panic: runtime error: slice bounds out of range [12136:12133] [recovered] panic: runtime error: slice bounds out of range [12136:12133] goroutine 177 [running]: testing.tRunner.func1.2({0x7934a0, 0xc0017bac30}) /usr/lib/go/src/testing/testing.go:1209 +0x24e testing.tRunner.func1() /usr/lib/go/src/testing/testing.go:1212 +0x218 panic({0x7934a0, 0xc0017bac30}) /usr/lib/go/src/runtime/panic.go:1038 +0x215 github.com/alecthomas/chroma/lexers/r.rakuRules.func1.1(0xc001784210) /home/jraspass/chroma/lexers/r/raku.go:541 +0x1145 github.com/alecthomas/chroma.MutatorFunc.Mutate(0xc00132e950, 0x2fc0) /home/jraspass/chroma/mutators.go:24 +0x1f github.com/alecthomas/chroma.(*LexerState).Iterator(0xc001784210) /home/jraspass/chroma/regexp.go:363 +0x3a2 github.com/alecthomas/chroma.(*coalescer).Tokenise.func1() /home/jraspass/chroma/coalesce.go:15 +0x2f github.com/alecthomas/chroma.Tokenise({0x8e5188, 0xc000f4db60}, 0x3044, {0xc001254000, 0x0}) /home/jraspass/chroma/regexp.go:191 +0x91 github.com/alecthomas/chroma/lexers_test.FileTest.func1(0x0) /home/jraspass/chroma/lexers/lexers_test.go:54 +0xdf testing.tRunner(0xc001791520, 0xc0014e6600) /usr/lib/go/src/testing/testing.go:1259 +0x102 created by testing.(*T).Run /usr/lib/go/src/testing/testing.go:1306 +0x35a FAIL github.com/alecthomas/chroma/lexers 13.907s FAIL
The text was updated successfully, but these errors were encountered:
@CIAvash any ideas?
Sorry, something went wrong.
I will look into it when I get the time.
Raku: Fix unterminated heredoc fixes alecthomas#547
30cfac6
- Fix heredoc - Move testdata to raku directory - Add testdata for unterminated heredoc
4d7154e
No branches or pull requests
Describe the bug
An unterminated heredoc in Raku causes chroma to panic.
To Reproduce
The text was updated successfully, but these errors were encountered: