Skip to content

YAML frontmatter breaks syntax for Markdown body #309

Open
@sheriferson

Description

@sheriferson

Apologies if I missed an issue or configuration that handles this. I looked around but couldn't find anything.

I'm finding that having YAML frontmatter in a .md file breaks the syntax highlighting and formatting for the Markdown body.

Here are two screenshots that demonstrate this:

Screen Shot 2020-01-07 at 9 39 31 PM

Screen Shot 2020-01-07 at 9 39 42 PM

The syntax in the second screenshot is what I would expect. Link in a different color from body, "YAML" in bold, etc.

filetype is pandoc. I also tried :set filetype=pandoc.markdown, but it didn't change anything.

I have both vim-pandoc and vim-pandoc-syntax installed, and these are the only pandoc settings I have in init.vim

" ## vim-pandoc
let g:pandoc#folding#fdc = 0
let g:pandoc#spell#enabled = 0
let g:pandoc#syntax#codeblocks#embeds#langs = ['yaml', 'sh', 'html', 'sql', 'python', 'fish']
let g:pandoc#syntax#conceal#urls = 1

Is this expected behavior? Or is there a way to get proper highlighting for both the YAML and Markdown portions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions