yzhang-gh / vscode-markdown

Markdown All in One
https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
MIT License
2.87k stars 323 forks source link

Upgrading pandoc to 2.11 breaks rendering when a bibliography is set #858

Open robwalton opened 3 years ago

robwalton commented 3 years ago

Problem

Using pandoc to render a markdown file with a bibliography set in the header fails.

How to reproduce

For example the file:

---
title: some title
bibliography: ~/writing/bibliography.bib
---

Some writing...

fails to render and Markdown Preview Enhanced reports:

Error: Command failed: /usr/local/bin/pandoc --from=markdown-raw_tex+tex_math_single_backslash --to=html --katex --filter pandoc-citeproc
[WARNING] Deprecated: pandoc-citeproc filter. Use --citeproc instead.
pandoc-citeproc: Error in $: Incompatible API versions: encoded with [1,22] but attempted to decode with [1,21].
CallStack (from HasCallStack):
  error, called at ./Text/Pandoc/JSON.hs:112:48 in pandoc-types-1.21-LpPdBV1sPudK4kVghsVxWs:Text.Pandoc.JSON
Error running filter pandoc-citeproc:
Filter returned error status 1

This occurs when markdown-preview-enhanced.pandocArguments is left blank.

Diagnosis

As described in the release notes pandoc 2.11 changes the way citations are handled. Markdown Preview Enhanced adds --filter pandoc-citeproc to the pandoc call. To work with pandoc 2.11 it should instead add --citeproc.

Lemmingh commented 3 years ago

It seems to be a problem of Markdown Preview Enhanced, not this extension.

Lemmingh commented 3 years ago

https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/432

robwalton commented 3 years ago

It seems to be a problem of Markdown Preview Enhanced, not this extension.

Whoops, sorry you are right