I have a very basic question: I use the lang-yaml
package to style Markdown with a YAML frontmatter. However, because Markdown is one of the few languages that looks better and is easier to read with a sans font, I want to make everything use a regular sans font, but I want to keep the frontmatter in monospace.
I see that the frontmatterLanguage
defines a new node, FrontmatterContent
that would be suitable for styling separately. However, I cannot find a way to access this and assign a monospaced styling to it in my themes, because tag names aren’t exported from the package.
I did see that the package itself already assigns styling to the DashLine
node:
const frontmatterLanguage = LRLanguage.define({
name: "yaml-frontmatter",
parser: frontmatterParser.configure({
props: [styleTags({DashLine: tags.meta})]
})
})
How could I style the frontmatter content node separately from the rest…?
Tia!
P.S.: Is there a reason you chose to style the DashLine using tags.meta
instead of tags.contentSeparator
…?