Skip to content

🐛 FIX: blank lines after block quotes #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2020
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
8 changes: 7 additions & 1 deletion markdown_it/rules_block/state_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ def isEmpty(self, line):
def skipEmptyLines(self, from_pos):
"""."""
while from_pos < self.lineMax:
if (self.bMarks[from_pos] + self.tShift[from_pos]) < self.eMarks[from_pos]:
try:
if (self.bMarks[from_pos] + self.tShift[from_pos]) < self.eMarks[
from_pos
]:
break
except IndexError:
from_pos += 1
break
from_pos += 1
return from_pos
Expand Down
16 changes: 16 additions & 0 deletions tests/test_port/fixtures/issue-fixes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@
<li>b</li>
</ul>
.

#50 blank lines after block quotes
.
> A Block Quote

> Another Block Quote


.
<blockquote>
<p>A Block Quote</p>
</blockquote>
<blockquote>
<p>Another Block Quote</p>
</blockquote>
.
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
envlist = py37

[testenv]
# only recreate the environment when we use `tox -r`
recreate = false
usedevelop = true

[testenv:py{36,37,38}]
extras = testing
Expand Down