Skip to content

Commit 84dcefe

Browse files
authored
🐛 Fix: tab preventing paragraph continuation in lists (#274)
Implements upstream: markdown-it/markdown-it@1cd8a51
1 parent eb96da1 commit 84dcefe

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

markdown_it/port.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- package: markdown-it/markdown-it
2-
version: 12.3.0
3-
commit: 2e31d3430187d2eee1ba120c954783eebb93b4e8
4-
date: Dec 9, 2021
2+
version: 12.3.1
3+
commit: 76469e83dc1a1e3ed943b483b554003a666bddf7
4+
date: Jan 7, 2022
55
notes:
66
- Rename variables that use python built-in names, e.g.
77
- `max` -> `maximum`

markdown_it/rules_block/list.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def list_block(state: StateBlock, startLine: int, endLine: int, silent: bool) ->
130130
if (
131131
silent
132132
and state.parentType == "paragraph"
133-
and state.tShift[startLine] >= state.blkIndent
133+
and state.sCount[startLine] >= state.blkIndent
134134
):
135135
isTerminatingParagraph = True
136136

tests/test_port/fixtures/commonmark_extras.md

+21
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,27 @@ Regression test (code block + regular paragraph)
166166
</blockquote>
167167
.
168168

169+
Regression test (tabs in lists, #830)
170+
.
171+
1. asd
172+
2. asd
173+
174+
---
175+
176+
1. asd
177+
2. asd
178+
.
179+
<ol>
180+
<li>asd
181+
2. asd</li>
182+
</ol>
183+
<hr />
184+
<ol>
185+
<li>asd
186+
2. asd</li>
187+
</ol>
188+
.
189+
169190
Blockquotes inside indented lists should terminate correctly
170191
.
171192
- a

0 commit comments

Comments
 (0)