diff options
author | facelessuser <faceless.shop@gmail.com> | 2017-10-07 08:56:58 -0600 |
---|---|---|
committer | facelessuser <faceless.shop@gmail.com> | 2017-10-07 08:56:58 -0600 |
commit | c55c50ca3af1fcf599c7d7041be840e11e932c67 (patch) | |
tree | 4001912be00db3ce733e58885bc3b12f4f42e2da /markdown/extensions/footnotes.py | |
parent | 08abeb528fd5345e8d6cedc3b177bd812f441dd6 (diff) | |
download | python-markdown-raw-html-ref-issue.tar.gz |
Strip the gathered extraneous whitespaceraw-html-ref-issue
When processing footnotes, we don't actually care to process the extra whitespace at the end of a footnote, but we want it to calculate lines to preserve.
Diffstat (limited to 'markdown/extensions/footnotes.py')
-rw-r--r-- | markdown/extensions/footnotes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py index 580dfa0..aa11cbf 100644 --- a/markdown/extensions/footnotes.py +++ b/markdown/extensions/footnotes.py @@ -234,7 +234,7 @@ class FootnotePreprocessor(Preprocessor): fn.insert(0, m.group(2)) i += _i-1 # skip past footnote footnote = "\n".join(fn) - self.footnotes.setFootnote(m.group(1), footnote) + self.footnotes.setFootnote(m.group(1), footnote.rstrip()) # Preserve a line for each block to prevent raw HTML indexing issue. # https://github.com/Python-Markdown/markdown/issues/584 num_blocks = (len(footnote.split('\n\n')) * 2) |