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
+
d ↩︎
+