Skip to content

Markdown KaTeX Highlighting: Percent symbol (%) not escaped #138921

@cobrexus

Description

@cobrexus

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.63.0
  • OS Version: Windows 11

Steps to Reproduce:

Create new markdown file and write the following markdown:

$$ \leftarrow \text{percent sign} $$
$$ \% \leftarrow \text{percent sign} $$

Notice how the second line with the percent (%) symbol is not syntax highlighted after this symbol. This is because the percent symbol in KaTeX creates a comment, but I have escaped the symbol with a backslash (\).

If you open markdown preview, the second line renders, so VS Code's markdown KaTeX renderer sees that I have escaped the symbol, but the highlighter does not.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buggood first issueIssues identified as good for first-time contributorsgrammarSyntax highlighting grammarinsiders-releasedPatch has been released in VS Code InsidersmarkdownMarkdown support issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions