Skip to content

Commit

Permalink
Fix tab preventing paragraph continuation in lists
Browse files Browse the repository at this point in the history
  • Loading branch information
rlidwka committed Jan 7, 2022
1 parent 830757c commit 7478775
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules_block/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ module.exports = function list(state, startLine, endLine, silent) {
// This code can fail if plugins use blkIndent as well as lists,
// but I hope the spec gets fixed long before that happens.
//
if (state.tShift[startLine] >= state.blkIndent) {
if (state.sCount[startLine] >= state.blkIndent) {
isTerminatingParagraph = true;
}
}
Expand Down
21 changes: 21 additions & 0 deletions test/fixtures/markdown-it/commonmark_extras.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,27 @@ Regression test (code block + regular paragraph)
</blockquote>
.

Regression test (tabs in lists, #830)
.
1. asd
2. asd

---

1. asd
2. asd
.
<ol>
<li>asd
2. asd</li>
</ol>
<hr>
<ol>
<li>asd
2. asd</li>
</ol>
.

Blockquotes inside indented lists should terminate correctly
.
- a
Expand Down

0 comments on commit 7478775

Please sign in to comment.