Skip to content

Commit

Permalink
remove padded whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Jan 20, 2022
1 parent 2cec1f0 commit 3fb00db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/mkdocs_bibtex/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _convert_pandoc_new(bibtex_string, csl_path):
citation = citation_regex.findall(markdown.replace("\n", " "))[0]
except IndexError:
citation = markdown
return citation
return citation.strip()


def _convert_pandoc_legacy(bibtex_string, csl_path):
Expand Down Expand Up @@ -107,7 +107,7 @@ def _convert_pandoc_legacy(bibtex_string, csl_path):

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


def find_cite_keys(markdown):
Expand Down
1 change: 0 additions & 1 deletion test_files/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ def test_format_pandoc(entries):
assert all(k in citations for k in entries)
assert all(entry != citations[k] for k, entry in entries.items())

print(citations)
assert (
citations["test"]
== "Author, F. & Author, S. Test title. *Testing Journal* **1**, (2019)."
Expand Down

0 comments on commit 3fb00db

Please sign in to comment.