microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.37k stars 29.32k forks source link

Vscode and github.com disagree on markdown renderings #190173

Closed v0lta closed 1 year ago

v0lta commented 1 year ago

First of all, I would like to thank you for the great work you do. I rely on both vscode and github.com every day to do my job!

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

Version: 1.81.0

Commit: 6445d93c81ebe42c4cbd7a60712e0b17d9463e97
Date: 2023-08-02T12:36:11.334Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 5.19.0-50-generic snap

Steps to Reproduce:

  1. Copy
    
    $$\tilde{{x}}\_{ijk} = \frac{x\_{ijk} - \mu}{\sigma}$$

$$\tilde{{x}}{ijk} = \frac{x{ijk} - \mu}{\sigma}$$


Into a .md file in vscode. Right-click and open the preview. Unfortunately, vscode and github.com disagree on the rendering.
See the `github.com` output below:

$$\tilde{{x}}\_{ijk} = \frac{x\_{ijk} - \mu}{\sigma}$$

$$\tilde{{x}}_{ijk} = \frac{x_{ijk} - \mu}{\sigma}$$

As you can see, `github.com` gets only the first expression right. Vscode only the second. It seems not possible presently to write one version for both systems. In March, `github.com` did not yet need the escape slash to render the second expression correctly. Currently, I am teaching a course with github-classroom and vscode. I would like to provide markdown files for the course explaining what should be done. Ideally, students can read rendered versions locally within `vscode` and on github.com.
I have also reported the issue here:
https://github.com/github/markup/issues/1709
v0lta commented 1 year ago

Ahh I see: https://code.visualstudio.com/docs/languages/markdown#_does-vs-code-support-github-flavored-markdown

There are two markdown specifications. So I am guessing this is expected.