Skip to content
New issue

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

fix(parser) prevent gobbling of illegal newlines #4142

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Oct 20, 2024

Fixes #4101.

Changes

In case illegal detects a 0 width match the only case that can happen is a $ matching right before a newline, so we now not only add 1 (so the parser keeps going) but we also inject the \n back into the modeBuffer.

The only other case might be if someone is using look-ahead in a illegal, and we'll simply say that is not-necessary and also not supported.

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md

Copy link

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

3 files changed

Total change +28 B

View Changes
file base pr diff
es/core.min.js 8.18 KB 8.19 KB +9 B
es/highlight.min.js 8.18 KB 8.19 KB +9 B
highlight.min.js 8.22 KB 8.23 KB +10 B

@joshgoebel joshgoebel force-pushed the fix-gobbling-of-illegal-newlines branch from e0f145b to f542e90 Compare December 14, 2024 14:54
@joshgoebel joshgoebel marked this pull request as ready for review December 14, 2024 14:54
Copy link

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

3 files changed

Total change +25 B

View Changes
file base pr diff
es/core.min.js 8.18 KB 8.19 KB +8 B
es/highlight.min.js 8.18 KB 8.19 KB +8 B
highlight.min.js 8.22 KB 8.23 KB +9 B

@joshgoebel joshgoebel merged commit 3e06867 into main Dec 14, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(css) Line breaks disappear
1 participant