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 syntax highlighting not working as expected #220026

Closed
Tracked by #1
huijing opened this issue Jul 5, 2024 · 8 comments
Closed
Tracked by #1

Markdown syntax highlighting not working as expected #220026

huijing opened this issue Jul 5, 2024 · 8 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) markdown Markdown support issues

Comments

@huijing
Copy link

huijing commented Jul 5, 2024

Type: Bug

Syntax highlighting for .md files and .mdx files is not behaving as expected. This is a recent observation in spite of not changing any of my theme or code settings. Unclear if it was introduced during one of the latest releases. The syntax highlighter is not identifying markdown specific things like double asterisks for bold, or backticks for code, or codeblocks between triple backticks. So it seems like the syntax highlighter forgot how to understand markdown?

Screenshot 2024-07-05 at 11 23 45 AM

VS Code version: Code - Insiders 1.92.0-insider (Universal) (34f8428, 2024-07-04T05:50:23.194Z)
OS version: Darwin arm64 23.5.0
Modes:

System Info
Item Value
CPUs Apple M2 Max (12 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 2, 2, 3
Memory (System) 32.00GB (0.24GB free)
Process Argv --crash-reporter-id 45285dfb-8eb6-4407-8123-fb10f0bf8622
Screen Reader no
VM 0%
Extensions (21)
Extension Author (truncated) Version
astro-vscode ast 2.10.2
language-hugo-vscode bud 1.3.1
vscode-eslint dba 3.0.10
gitlens eam 15.1.0
prettier-vscode esb 10.4.0
copilot-chat Git 0.17.0
vscode-github-actions git 0.26.3
vscode-graphql Gra 0.11.0
vscode-graphql-execution Gra 0.2.6
vscode-graphql-syntax Gra 1.3.6
vscode-duplicate mrm 1.2.1
remote-containers ms- 0.376.0
twig-language-support rho 1.0.1
nunjucks ron 0.3.1
vscode-drupal sta 0.4.4
code-spell-checker str 3.0.1
even-better-toml tam 0.19.2
vscode-mdx uni 1.8.9
gistfs vsl 0.6.0
console-ninja Wal 1.0.327
pretty-ts-errors Yoa 0.5.4

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
vsaa593cf:30376535
py29gd2263:31024238
c4g48928:30535728
2i9eh265:30646982
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythonregdiag2:30926734
pythonmypyd1:30859725
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
cppperfnew:30980852
pythonait:30973460
jchc7451:31067543
chatpanelt:31014475
f3je6385:31013174
a69g1124:31018687
dvdeprecation:31040973
dwnewjupytercf:31046870
newcmakeconfigv2:31071590
impr_priority:31057980
nativerepl1:31071684
refactort:31084545
pythonrstrctxt:31089940
4930e709:31088354

@RedCMD
Copy link
Contributor

RedCMD commented Jul 5, 2024

caused by microsoft/vscode-markdown-tm-grammar#162 and #219833

@postylem
Copy link

postylem commented Jul 5, 2024

I would add for what its worth it seems it is the presence of yaml frontmatter breaks the syntax highlighting in markdown files...

@fweth
Copy link

fweth commented Jul 20, 2024

image
Somehow my VSCode (1.92.0-insider) doesn't understand frontmatter although the online version (insiders.vscode.dev) understands it. I disabled all extensions.

@postylem
Copy link

postylem commented Jul 27, 2024

To give a little more detail on when the bug shows up: it seems the highlighting breaks only when there is more than one key in the YAML header.

with only one line in the YAML header, highlighting works

Screenshot 2024-07-27 at 08 29 03

adding the line date: today breaks the highlighting

Screenshot 2024-07-27 at 08 29 38

version info:

Version: 1.92.0-insider
Commit: 4d17e85
Date: 2024-07-26T13:12:28.318Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.5.0

@RedCMD
Copy link
Contributor

RedCMD commented Jul 27, 2024

I can confirm it is fixed in the current latest insiders

@postylem
Copy link

postylem commented Jul 27, 2024

That's odd, I believed I was using the latest version. Checking for updates informs me there are no updates, however now I see there are indeed later commits. I'll wait for the next build, I suppose.

@mjbvz mjbvz added markdown Markdown support issues *duplicate Issue identified as a duplicate of another issue(s) labels Jul 31, 2024
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@memeplex
Copy link

memeplex commented Aug 2, 2024

Quarto extension syntax highlighting has seemingly been affected by this after latest VSCode upgrade: quarto-dev/quarto#501

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) markdown Markdown support issues
Projects
None yet
Development

No branches or pull requests

7 participants