diff --git a/markdown_it/parser_block.py b/markdown_it/parser_block.py index 04d70334..dd002354 100644 --- a/markdown_it/parser_block.py +++ b/markdown_it/parser_block.py @@ -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 diff --git a/tests/test_plugins/fixtures/footnote.md b/tests/test_plugins/fixtures/footnote.md index 7ffeb8bf..cfc7ee3b 100644 --- a/tests/test_plugins/fixtures/footnote.md +++ b/tests/test_plugins/fixtures/footnote.md @@ -297,4 +297,32 @@ hij

↩︎ -. \ No newline at end of file +. + +issue-133 +. +> b [^1] + +Some text + +> c + +[^1]: d + + +. +
+

b [1]

+
+

Some text

+
+

c

+
+
+
+
    +
  1. d ↩︎

    +
  2. +
+
+. diff --git a/tox.ini b/tox.ini index 34ae106a..855aa8e6 100644 --- a/tox.ini +++ b/tox.ini @@ -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]