microsoft / vscode-markdown-tm-grammar

VS Code built-in markdown extension's Textmate grammar
MIT License
64 stars 49 forks source link

Inconsistancy between md highlighting and preview #121

Closed pcd444 closed 1 year ago

pcd444 commented 2 years ago

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

Steps to Reproduce:

  1. Create md file
  2. paste following ab cd
    ef\\\\| gh
  3. open preview
  4. Observe difference between highlighting and preview

highlighting preview

As you can see the highlighting makes it seem like there should be two raw backslash characters, but in the preview there is only one and one of the vertical slash characters has been escaped. I don't know which is right but they should agree.

Also other md renderers do it a different way.

mjbvz commented 2 years ago

Duplicate of microsoft/vscode#91279

pcd444 commented 2 years ago

I don't belive this is a duplicate of the linked issue. The linked issue seems to be about the syntax highlighting of code snippets in the preview. This issue is that the syntax highlighting of the markdown code in the markdown editor is different from how the markdown is interpreted by the preview. In the raw MD code

ab\ cd
ef\\\\| gh

The series of slashes \\\\ are all highlighted orange. This implies that it should end up as 2 plaintext slashes in render. But when you look at the preview there is only one slash and somehow the table divide character "|" has been escaped.

mjbvz commented 1 year ago

This falls under #125. We don't parse tables at all right now

Closing in favor of that issue