You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Enter your MD code on the test page.
Select the YAML language.
Reload the page. (This will cause the test page to unload all languages and then load only YAML.)
Select the Markdown language. (Markdown will now be loaded. Since YAML has been loaded before Markdown, Markdown will be able to see YAML and use it for front matter.)
I know that this is quite cumbersome, but this very manual approach to language loading on the test page is great for testing.
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: