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

Markdown bug: Changing closing backtick positions disables all code highlighting in file #68

Open
lukewlms opened this issue Feb 7, 2025 · 1 comment

Comments

@lukewlms
Copy link

lukewlms commented Feb 7, 2025

Version: 3.0.10

Repro steps

  1. Create a highlighted MD string
  2. Move the closing backtick to different positions

Result

  • When the closing backtick is in positions as in examples (2) and (3) below, code highlighting is disabled for the remaining TypeScript in the file.
  • Code highlighting for all subsequent strings becomes Markdown, even if not marked
  • Interestingly in the final example, the two incorrectly highlighted strings are also highlighted differently (one orange, one blue and italic). I didn't repro that separately from this issue though.

Expected

Code highlighting for TypeScript outside of strings should not be affected.

Example 1 (ok)

Image

Example 2 (backtick at end of line - broken)

Image

Example 3 (backtick after space - broken)

Image

Example 4 (subsequent strings are incorrectly, and differently, highlighted as MD)

Image
@lukewlms
Copy link
Author

lukewlms commented Feb 7, 2025

@aslushnikov you may be interested in this issue.

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

No branches or pull requests

1 participant