jalvesaq / zotcite

Neovim plugin for integration with Zotero
GNU General Public License v3.0
177 stars 15 forks source link

zotref filter fails with latest Pandoc API (v1.22) #19

Closed xavriley closed 4 years ago

xavriley commented 4 years ago

I was finding that references were not being resolved with the latest version of Pandoc.

This issues appears to be that the API has now changed, affecting this line:

https://github.com/jalvesaq/zotcite/blob/master/python3/zotref#L28

The regex there is expecting the citationId field to be immediately followed by citationHash. This isn't the case with pandoc 2.11.0.4 though:

# example of the newer API for citations
{"t": "Para", "c": [{"t": "Cite", "c": [[{"citationId": "B5FQ3C9C", "citationPrefix": [], "citationSuffix": [], "citationMode": {"t": "AuthorInText"}, "citationNoteNum": 1, "citationHash": 0}], [{"t": "Str", "c": "@B5FQ3C9C#Kim_Etal_2018"}]]}

I managed to resolve this locally by removing the word Hash from the end of the regex. I'll put in a PR now - this issue was just for visibility incase anyone else gets stuck.

Thanks for a great plugin!

jalvesaq commented 4 years ago

Closed by https://github.com/jalvesaq/zotcite/commit/c8b01497f61c2b3a40915102f42972c16e4d6b9b