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

Add YAML/TOML frontmatter injections for markdown #21503

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

uncenter
Copy link
Contributor

@uncenter uncenter commented Dec 4, 2024

Closes #7938. Adds the frontmatter injections, as done in https://github.com/tree-sitter-grammars/tree-sitter-markdown/blob/split_parser/tree-sitter-markdown/queries/injections.scm.

Before After
CleanShot 2024-12-03 at 22 24 01 CleanShot 2024-12-03 at 22 24 31

Release Notes:

  • Added YAML and TOML frontmatter highlighting for markdown

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 4, 2024
@notpeter
Copy link
Member

notpeter commented Dec 6, 2024

--- is YAML frontmatter
+++ is TOML.
At least that's the convention used by hugo front-matter and Zola front-matter.

I am not aware of any system which assumes YAML for +++.

@notpeter notpeter mentioned this pull request Dec 6, 2024
1 task
@notpeter notpeter changed the title Add YAML frontmatter injections for markdown Add YAML/TOML frontmatter injections for markdown Dec 6, 2024
@notpeter notpeter self-assigned this Dec 6, 2024
@uncenter
Copy link
Contributor Author

uncenter commented Dec 6, 2024

Thanks for updating that, that was my experience as well but was just going with upstream. This lgtm.

@notpeter notpeter merged commit feb2d85 into zed-industries:main Dec 6, 2024
12 checks passed
@notpeter
Copy link
Member

notpeter commented Dec 6, 2024

Thanks for this!
Screenshot 2024-12-06 at 11 16 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support frontmatter
2 participants