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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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

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