Skip to content

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

Open
@lukewlms

Description

@lukewlms

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions