Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Strip the gathered extraneous whitespace
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.
  • Loading branch information
facelessuser committed Oct 7, 2017
commit c55c50ca3af1fcf599c7d7041be840e11e932c67
2 changes: 1 addition & 1 deletion markdown/extensions/footnotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def run(self, lines):
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)
Expand Down