pandoc “cannot parse yaml header” when converting md to pdf

后端 未结 1 415
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-30 00:44

I am trying to convert a markdown document to pdf using pandoc, and it was working fine until it just started to show an error:

pandoc: Could not parse YAML          


        
相关标签:
1条回答
  • 2020-12-30 01:22

    See http://johnmacfarlane.net/pandoc/README.html#yaml-metadata-block

    There must be something in your document that looks like a YAML metadata block, but isn't. Such a block would start with --- on a line by itself and end with --- or ... on a line by itself. The line numbers in the error message refer to lines inside the metadata block, not to lines of the document.

    By the way, you can turn off YAML metadata block parsing entirely by putting

    --from markdown-yaml_metadata_block
    

    in your pandoc command line.

    0 讨论(0)
提交回复
热议问题