From badf3ccf4a0d56b9f5a8abf06dbd8425f30b89cd Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Fri, 24 May 2019 00:28:44 -0700 Subject: [PATCH] Change whitespace stripping logic --- lexipython/article.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lexipython/article.py b/lexipython/article.py index 7e1e94c..5609780 100644 --- a/lexipython/article.py +++ b/lexipython/article.py @@ -126,7 +126,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(re.sub(r"\s+", " ", link_match.group(3))) + cite_title = utils.titlecase(link_match.group(3).strip()) # Record the citation cite = LexiconCitation(format_id, cite_text, cite_title) citations.append(cite)