Skip to content

Commit

Permalink
Fix tab preventing paragraph continuation in lists
Browse files Browse the repository at this point in the history
close #830
  • Loading branch information
rlidwka committed Jan 7, 2022
1 parent 830757c commit 1cd8a51
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [12.3.1] - WIP
### Fixed
- Fix corner case when tab prevents paragraph continuation in lists, #830.


## [12.3.0] - 2021-12-09
### Changed
- `StateInline.delimiters[].jump` is removed.
Expand Down Expand Up @@ -583,6 +588,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Renamed presets folder (configs -> presets).


[12.3.1]: https://github.com/markdown-it/markdown-it/compare/12.3.0...12.3.1
[12.3.0]: https://github.com/markdown-it/markdown-it/compare/12.2.0...12.3.0
[12.2.0]: https://github.com/markdown-it/markdown-it/compare/12.1.0...12.2.0
[12.1.0]: https://github.com/markdown-it/markdown-it/compare/12.0.6...12.1.0
Expand Down
2 changes: 1 addition & 1 deletion lib/rules_block/list.js
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
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 1cd8a51

Please sign in to comment.