Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions markdown_it/parser_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ def tokenize(
# i.e. latest empty line should not count
state.tight = not hasEmptyLines

line = state.line

# paragraph might "eat" one newline after it in nested lists
if state.isEmpty(state.line - 1):
if (line - 1) < endLine and state.isEmpty(line - 1):
hasEmptyLines = True

line = state.line

if line < endLine and state.isEmpty(line):
hasEmptyLines = True
line += 1
Expand Down
30 changes: 29 additions & 1 deletion tests/test_plugins/fixtures/footnote.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,32 @@ hij</p>
<a href="#fnref1" class="footnote-backref">↩︎</a></li>
</ol>
</section>
.
.

issue-133
.
> b [^1]

Some text

> c

[^1]: d


.
<blockquote>
<p>b <sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup></p>
</blockquote>
<p>Some text</p>
<blockquote>
<p>c</p>
</blockquote>
<hr class="footnotes-sep">
<section class="footnotes">
<ol class="footnotes-list">
<li id="fn1" class="footnote-item"><p>d <a href="#fnref1" class="footnote-backref">↩︎</a></p>
</li>
</ol>
</section>
.
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ envlist = py37
usedevelop = true

[testenv:py{36,37,38}]
extras = testing
extras =
linkify
testing
commands = pytest {posargs}

[testenv:py{36,37,38}-bench-core]
Expand Down