wooorm / markdown-tm-language

really good syntax highlighting for markdown and MDX
https://wooorm.com/markdown-tm-language/
MIT License
42 stars 1 forks source link

Strikethrough doesn’t work in VSCode #2

Closed remcohaszing closed 1 year ago

remcohaszing commented 1 year ago

Strikethrough syntax (~~text~~) isn’t highlighted in VSCode. I see it is being highlighted on https://wooorm.com/markdown-tm-language, but it uses the same colors as a syntax error.

wooorm commented 1 year ago

Please add which theme you are using

remcohaszing commented 1 year ago

I use blackai-theme, but also reproduced it using a temporary VSCode profile, which uses Dark+ (Default dark). Inspecting using the web inspector shows no element is created for the strikethrough tokens.

wooorm commented 1 year ago

Default dark is very minimal, it doesn’t show many things. That being said, solarized is the same!

remcohaszing commented 1 year ago

I thought they would have different HTML elements with different class names though, although styled the same. Is this not the case then?

I suppose this question is more related to how Monaco / VSCode handles this internally than to the language.

wooorm commented 1 year ago

Themes have selectors. They match the names provided here. Sort of like CSS but different. If the selectors don’t match, nothing happens: no element. If they do match, only some foreground/background/font-style stuff is passed through.

Example: https://github.com/sdras/night-owl-vscode-theme/blob/f260cea5356261337d18809bdbe922952c7a6fa4/themes/Night%20Owl-color-theme-noitalic.json#L1402-L1409

And then VS Code grammars/themes use different names than GH/Atom does.

And then there’s hundreds of languages and hundreds of themes. So it’s messy