Markdown-preview-enhanced: Pandoc: Don't force-include --filter pandoc-citeproc as arguments

Created on 1 Nov 2020  路  6Comments  路  Source: shd101wyy/markdown-preview-enhanced

As of pandoc 2.11 --filter pandoc-citeproc has been removed (along with pandoc-citeproc), and replaced with a new library, which is called by using the --citeproc argument. In order to ensure compatibility with different pandoc versions, I suggest neither argument is forced onto the user, but rather letting them specify their preference as the other optional arguments.

Source: https://pandoc.org/MANUAL.html#option--citeproc

Most helpful comment

Quick fix: modify the code of the mume package in your local copy.

  1. In your vscode extensions directory, go to: \shd101wyy.markdown-preview-enhanced-0.5.13\node_modules\@shd101wyy\mume\out\src
  2. Edit both markdown-engine.js and pandoc-convert.js (the code is exactly the same, for some reason)
  3. Search for citeproc, change line which reads
args.push("--filter", "pandoc-citeproc");

to

args.push("--citeproc");

or remove it completely if you don't want citeproc despite using bibliography (though this may break other things).

  1. Changes will be applied immediately / after vscode window reload.

I'm not good enough with js to produce a reliable pull request to mume (you'd probably need to check for pandoc version). You'll need to repeat the above steps if mpe gets updated.

All 6 comments

Quick fix: modify the code of the mume package in your local copy.

  1. In your vscode extensions directory, go to: \shd101wyy.markdown-preview-enhanced-0.5.13\node_modules\@shd101wyy\mume\out\src
  2. Edit both markdown-engine.js and pandoc-convert.js (the code is exactly the same, for some reason)
  3. Search for citeproc, change line which reads
args.push("--filter", "pandoc-citeproc");

to

args.push("--citeproc");

or remove it completely if you don't want citeproc despite using bibliography (though this may break other things).

  1. Changes will be applied immediately / after vscode window reload.

I'm not good enough with js to produce a reliable pull request to mume (you'd probably need to check for pandoc version). You'll need to repeat the above steps if mpe gets updated.

This works, thanks!

Thanks Ddedalus, that fixed my issue.

Fixed my issue too, but bumping here to indicate that this doesn't really "fix" the problem yet, just a workaround :)

Yes I will try to issue a new release to fix the issue this weekend

Updated to use --citeproc instead of --filter pandoc-citeproc now :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shd101wyy picture shd101wyy  路  4Comments

lambdafu picture lambdafu  路  3Comments

abhayghatpande picture abhayghatpande  路  5Comments

AdamBear-Me picture AdamBear-Me  路  5Comments

siriuscc picture siriuscc  路  3Comments