From 3584351d18907f8bc5233d1833c30bf7c1af286d Mon Sep 17 00:00:00 2001 From: shyamd <16827130+shyamd@users.noreply.github.com> Date: Wed, 5 Jan 2022 21:46:00 -0800 Subject: [PATCH] fix parsing for older pandoc version --- mkdocs_bibtex/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkdocs_bibtex/plugin.py b/mkdocs_bibtex/plugin.py index 25cac6a..a74f948 100644 --- a/mkdocs_bibtex/plugin.py +++ b/mkdocs_bibtex/plugin.py @@ -226,5 +226,6 @@ def to_markdown_pandoc(entry, csl_path): filters=["pandoc-citeproc"], ) - citation = markdown.replace("\n", " ")[4:] + citation_regex = re.compile(r"(?:1\.)?(.*)") + citation = citation_regex.findall(markdown.replace("\n", " "))[0] return citation