-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Markdown front matter highlighting not the same as YAML? #3283
Comments
It does work, it's just a little difficult to do on the test page. Prism's languages have dependencies. I.e. Markdown (optionally) depends on YAML to highlight front matter. Prism does not resolve dependencies itself and assumes that languages are loaded in the correct order to satisfy all their dependencies. I.e. YAML has to be loaded before Markdown; Markdown won't be able to see YAML otherwise. So to see front matter being highlighted on the test page, you have to do the following:
I know that this is quite cumbersome, but this very manual approach to language loading on the test page is great for testing. |
Thanks for your explanation! I've managed to fix it on our side. |
Information
Description
YAML keys and values have different highlighting; however, all Markdown front matter is treated as plain string.
I'm aware that #2634 adds support for front matter, but that still doesn't make front matter displayed the same as YAML.
Code snippet
Test page
The code being highlighted incorrectly.
The text was updated successfully, but these errors were encountered: