Skip to content

Commit 4e1150e

Browse files
authored
🐛 FIX: blank lines after block quotes (#61)
1 parent ff77965 commit 4e1150e

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

markdown_it/rules_block/state_block.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ def isEmpty(self, line):
131131
def skipEmptyLines(self, from_pos):
132132
"""."""
133133
while from_pos < self.lineMax:
134-
if (self.bMarks[from_pos] + self.tShift[from_pos]) < self.eMarks[from_pos]:
134+
try:
135+
if (self.bMarks[from_pos] + self.tShift[from_pos]) < self.eMarks[
136+
from_pos
137+
]:
138+
break
139+
except IndexError:
140+
from_pos += 1
135141
break
136142
from_pos += 1
137143
return from_pos

tests/test_port/fixtures/issue-fixes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,19 @@
1313
<li>b</li>
1414
</ul>
1515
.
16+
17+
#50 blank lines after block quotes
18+
.
19+
> A Block Quote
20+
21+
> Another Block Quote
22+
23+
24+
.
25+
<blockquote>
26+
<p>A Block Quote</p>
27+
</blockquote>
28+
<blockquote>
29+
<p>Another Block Quote</p>
30+
</blockquote>
31+
.

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
envlist = py37
88

99
[testenv]
10-
# only recreate the environment when we use `tox -r`
11-
recreate = false
10+
usedevelop = true
1211

1312
[testenv:py{36,37,38}]
1413
extras = testing

0 commit comments

Comments
 (0)