From c8cfbc6da8d2dc3e48d9fc4f67ac5498579c91a1 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Thu, 9 Aug 2018 09:10:00 -0700 Subject: [PATCH] Reduce whitespace inside citation targets --- src/article.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/article.py b/src/article.py index dbd5bea..9b2db7f 100644 --- a/src/article.py +++ b/src/article.py @@ -86,7 +86,7 @@ class LexiconArticle: while link_match: # Identify the citation text and cited article cite_text = link_match.group(2) if link_match.group(2) else link_match.group(3) - cite_title = utils.titlecase(link_match.group(3)) + cite_title = utils.titlecase(re.sub(r"\s+", " ", link_match.group(3))) # Record the citation citations["c"+str(format_id)] = (cite_text, cite_title) # Stitch the format id in place of the citation