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

Code Block Syntax highlighter #84

Open
codeaphex opened this issue Jan 5, 2021 · 1 comment
Open

Code Block Syntax highlighter #84

codeaphex opened this issue Jan 5, 2021 · 1 comment

Comments

@codeaphex
Copy link

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

@mjbvz mjbvz transferred this issue from mjbvz/vscode-github-markdown-preview Feb 16, 2022
@ghost
Copy link

ghost commented Mar 31, 2022

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

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant