Skip to content

Commit

Permalink
fix parsing for older pandoc version
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Jan 6, 2022
1 parent e948bff commit 3584351
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mkdocs_bibtex/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3584351

Please sign in to comment.