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

Highlight Frontmatter in Markdown as YAML #1783

Closed
FichteFoll opened this issue Nov 30, 2018 · 3 comments · Fixed by #2339
Closed

Highlight Frontmatter in Markdown as YAML #1783

FichteFoll opened this issue Nov 30, 2018 · 3 comments · Fixed by #2339

Comments

@FichteFoll
Copy link
Collaborator

Markdown documents may occasionally have a so-called "frontmatter" that is frequently using YAML syntax.

Using an embed, highlighting of this should be trivial.

Before settling onto YAML, however, have you seen other kinds of frontmatter in Markdown documents and if yes, which syntax do they use and how are they separated from the body?

@deathaxe
Copy link
Collaborator

deathaxe commented Dec 1, 2018

The only situation I saw frontmatter was with mdpopups, which uses YAML.

@FichteFoll
Copy link
Collaborator Author

FichteFoll commented Dec 2, 2018

Jekyll (and github issue templates) are other examples of YAML front matter.

I imagine most static page generators that allow for markdown input also chose to use YAML for front matter.

FichteFoll added a commit to FichteForks/Packages that referenced this issue Apr 19, 2020
Because this may only match at the very beginning of the file, it cannot
be tested. I tried.

Closes sublimehq#1783.
wbond pushed a commit that referenced this issue Jul 22, 2020
* [Markdown] Add YAML frontmatter highlighting

Because this may only match at the very beginning of the file, it cannot
be tested. I tried.

Closes #1783.

* [Markdown] Add test for normal `---` token

* [Markdown] Add `meta.formatter.markdown` scope

- Better supports embedding by not anchoring to `^`.
- Since some newish release we can also set out of the main context.

* [Markdown] Fix Multimarkdown tests by embedding

* [Markdown] Replace embed with multi-push
deathaxe pushed a commit to deathaxe/sublime-packages that referenced this issue Jul 25, 2021
* [Markdown] Add YAML frontmatter highlighting

Because this may only match at the very beginning of the file, it cannot
be tested. I tried.

Closes sublimehq#1783.

* [Markdown] Add test for normal `---` token

* [Markdown] Add `meta.formatter.markdown` scope

- Better supports embedding by not anchoring to `^`.
- Since some newish release we can also set out of the main context.

* [Markdown] Fix Multimarkdown tests by embedding

* [Markdown] Replace embed with multi-push
mitranim pushed a commit to mitranim/Packages that referenced this issue Mar 25, 2022
* [Markdown] Add YAML frontmatter highlighting

Because this may only match at the very beginning of the file, it cannot
be tested. I tried.

Closes sublimehq#1783.

* [Markdown] Add test for normal `---` token

* [Markdown] Add `meta.formatter.markdown` scope

- Better supports embedding by not anchoring to `^`.
- Since some newish release we can also set out of the main context.

* [Markdown] Fix Multimarkdown tests by embedding

* [Markdown] Replace embed with multi-push
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

Successfully merging a pull request may close this issue.

3 participants