mjbvz / vscode-github-markdown-preview-style

VS Code extension that changes the built-in markdown preview to match Github's styling
https://marketplace.visualstudio.com/items?itemName=bierner.markdown-preview-github-styles
MIT License
301 stars 57 forks source link

Code Block Syntax highlighter #84

Open codeaphex opened 3 years ago

codeaphex commented 3 years ago

There seems to be an issue with the code block syntax highlighter. For example this markdown:

```EditorConfig
[*.{cs,vb}]
dotnet_naming_rule.private_members_with_underscore.symbols  = private_fields
dotnet_naming_rule.private_members_with_underscore.style    = prefix_underscore
dotnet_naming_rule.private_members_with_underscore.severity = suggestion

dotnet_naming_symbols.private_fields.applicable_kinds           = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private

dotnet_naming_style.prefix_underscore.capitalization = camel_case
dotnet_naming_style.prefix_underscore.required_prefix = _
```

Renders like this... in a GitHub Issue: GitHub Issue and like this in Markdown Preview: Markdown Preview If I change the Language Tag from EditorConfig to INI it shows some highlighting though INI tag

Are you using a different highlighter than GitHub or is this the default Markdown syntax style? GitHub is using Linguist according to this page https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting

ghost commented 2 years ago

It looks a bit better now but in all honesty highlight.js and linguist are not 1-1

image image