Fix multiline strings for .js/.py/.sh - #973
Open
Leonard Hecker (lhecker) wants to merge 1 commit into
Open
Leonard Hecker (lhecker) wants to merge 1 commit into
Leonard Hecker (lhecker) wants to merge 1 commit into
Conversation
Comment on lines
+219
to
+223
| const TESTS: &[(&str, &[u8])] = &[ | ||
| ("javascript", include_bytes!("../../../assets/highlighting-tests/javascript.js")), | ||
| ("markdown", include_bytes!("../../../assets/highlighting-tests/markdown.md")), | ||
| ("sql", include_bytes!("../../../assets/highlighting-tests/sql.sql")), | ||
| ]; |
Member
Author
There was a problem hiding this comment.
Bonus changes.
Comment on lines
+23
to
+25
| if /\\/ { | ||
| if /$/ { yield string; await input; } | ||
| else if /./ {} |
Member
Author
There was a problem hiding this comment.
This now properly checks whether we're looking at
"a\b"or
"a\
b"
Comment on lines
-214
to
231
| // if input_offset == saved_offset { | ||
| // if input_offset == saved_offset && input_line == saved_line { | ||
| // input_offset += 1; | ||
| // } |
Member
Author
There was a problem hiding this comment.
Found a bug in deadlock prevention. await input resets the off on resumption, but this deadlock prevention logic still got the cached offset. To fix it, we need a new line number register such that we can be like [quoted code above].
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found an entire class of issues! Fixed:
await inputmeans that it wasn't a deadlock. Previously, this wouldresult in two lines of same length to miss colors on the 2nd line.