Replace markdown grammar with maintained version #6341
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This replaces the grammar used to highlight markdown with a maintained one.
I’ll add more sample files later. First wanted to bring this to your attention.
Related to: GH-6339.
Checklist:
Important: the current scope is
source.gfm
. The new scope istext.md
.There seems to be some Go code to handle
text.html.markdown
andtext.md
, which I changed.The reasons why I prefer changing
source.gfm
totext.md
is that:a) markdown is closer to a text, markup, language, than to a source language that is “evaluated” or so
b) markdown isn’t a superset of HTML, it has its own complex rules for that, so
text.html.markdown
isn’t great IMOc) Since it was (probably) added, GFM now bases itself on CommonMark (CM), bringing it much closer to normal markdown (for example, fenced code blocks are now “normal” markdown). This grammar, other than GFM features, also includes some other extensions (frontmatter, GitHub-specific features, directives, math), which aren’t in GFM
But, I wanted to bring this to attention because:
a) it’s still early days, I can be convinced to use something else
b)
source.gfm
is used in other existing grammars.Notably, I see these grammars that use
source.gfm
:jawee/language-blade
(not updated in 2 years)atom/language-ruby
(archived)language-viml
(@Alhadis)wooorm/markdown-tm-language
(that’s me, I can do that!)I imagine @Alhadis to be able to update this, and I can raise an issue with
jawee/language-blade
, although it’s not actively maintained, so I’m not sure that can be solved.