Skip to content

Commit

Permalink
better regex for legacy parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Jan 20, 2022
1 parent 7086f6f commit 2264b42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mkdocs_bibtex/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _convert_pandoc_legacy(bibtex_string, csl_path):
filters=["pandoc-citeproc"],
)

citation_regex = re.compile(r"(?:1\.)?(.*)")
citation_regex = re.compile(r"([\d\.\\]+)\s+(.*)")
citation = citation_regex.findall(markdown.replace("\n", " "))[0]
return citation

Expand Down

0 comments on commit 2264b42

Please sign in to comment.