Skip to content

Commit

Permalink
fix fixed indent list item looking indented code
Browse files Browse the repository at this point in the history
  • Loading branch information
vsch committed May 17, 2020
1 parent d40714e commit 424d3bc
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .idea/markdown-navigator.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/markdown-navigator/Wiki.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions VERSION-TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [Release 0.60.0](#release-0600)
- [API Refactoring](#api-refactoring)
- [Next 0.61.xx](#next-061xx)
- [0.61.30](#06130)
- [0.61.28](#06128)
- [0.61.26](#06126)
- [0.61.24](#06124)
Expand Down Expand Up @@ -226,6 +227,10 @@ Please give feedback on the upcoming changes if you have concerns about breaking
* [ ] Fix: Html converter to not add spaces between end of inline marker and next punctuation:
`.,:;`

## 0.61.30

* Fix: [#402, When using PegdownOptionsAdapter indented code blocks does not work for lists]

## 0.61.28

* Fix: Toc and SimToc `levels` parsing to properly handle levels as per documentation.
Expand Down Expand Up @@ -2526,4 +2531,6 @@ Please give feedback on the upcoming changes if you have concerns about breaking
[migrate flexmark-java 0_40_x to 0_42_0]: https://github.com/vsch/flexmark-java/blob/master/assets/migrations/migrate%20flexmark-java%200_40_x%20to%200_42_0.xml
<!-- @IGNORE PREVIOUS: link -->
[migrate flexmark-java 0_42_x to 0_50_0.xml]: https://github.com/vsch/flexmark-java/blob/master/assets/migrations/migrate%20flexmark-java%200_42_x%20to%200_50_0.xml
[#402, When using PegdownOptionsAdapter indented code blocks does not work for lists]: https://github.com/vsch/flexmark-java/issues/402
Original file line number Diff line number Diff line change
Expand Up @@ -2982,7 +2982,7 @@ Issue #108, problem of the list of some Space in front, misunderstanding of
`Parser.LISTS_ITEM_INDENT` setting to 2

```````````````````````````````` example(Issues - 108: 1) options(lists-item-indent)
1. **download**
1. **download**
2. **abc** →→
3. **999**
Expand All @@ -2996,21 +2996,21 @@ Issue #108, problem of the list of some Space in front, misunderstanding of
</li>
</ol>
.
Document[0, 51]
OrderedList[2, 50] isTight delimiter:'.'
OrderedListItem[2, 50] open:[2, 4, "1."] isTight
Paragraph[5, 20]
StrongEmphasis[5, 17] textOpen:[5, 7, "**"] text:[7, 15, "download"] textClose:[15, 17, "**"]
Text[7, 15] chars:[7, 15, "download"]
OrderedList[22, 50] isTight start:2 delimiter:'.'
OrderedListItem[22, 37] open:[22, 24, "2."] isTight
Paragraph[25, 37]
StrongEmphasis[25, 32] textOpen:[25, 27, "**"] text:[27, 30, "abc"] textClose:[30, 32, "**"]
Text[27, 30] chars:[27, 30, "abc"]
OrderedListItem[39, 50] open:[39, 41, "3."] isTight hadBlankLineAfter
Paragraph[42, 50] isTrailingBlankLine
StrongEmphasis[42, 49] textOpen:[42, 44, "**"] text:[44, 47, "999"] textClose:[47, 49, "**"]
Text[44, 47] chars:[44, 47, "999"]
Document[0, 49]
OrderedList[0, 48] isTight delimiter:'.'
OrderedListItem[0, 48] open:[0, 2, "1."] isTight
Paragraph[3, 18]
StrongEmphasis[3, 15] textOpen:[3, 5, "**"] text:[5, 13, "download"] textClose:[13, 15, "**"]
Text[5, 13] chars:[5, 13, "download"]
OrderedList[20, 48] isTight start:2 delimiter:'.'
OrderedListItem[20, 35] open:[20, 22, "2."] isTight
Paragraph[23, 35]
StrongEmphasis[23, 30] textOpen:[23, 25, "**"] text:[25, 28, "abc"] textClose:[28, 30, "**"]
Text[25, 28] chars:[25, 28, "abc"]
OrderedListItem[37, 48] open:[37, 39, "3."] isTight hadBlankLineAfter
Paragraph[40, 48] isTrailingBlankLine
StrongEmphasis[40, 47] textOpen:[40, 42, "**"] text:[42, 45, "999"] textClose:[45, 47, "**"]
Text[42, 45] chars:[42, 45, "999"]
````````````````````````````````


Expand Down Expand Up @@ -3299,5 +3299,18 @@ Document[0, 40]
````````````````````````````````


[#382, Is there an option for number of whitespaces needed to create sub-lists?]: https://github.com/vsch/flexmark-java/issues/382
## Issue 402

Indented code block looking like list item

```````````````````````````````` example Issue 402: 1
- this is indented code
.
<pre><code>- this is indented code
</code></pre>
.
Document[0, 27]
IndentedCodeBlock[4, 27]
````````````````````````````````


Original file line number Diff line number Diff line change
Expand Up @@ -3454,9 +3454,8 @@ pegdown converts second item to lazy continuation because it is indented by more
.
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" readonly="readonly" />&nbsp;First item
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" readonly="readonly" />&nbsp;Second item</li>
</ul>
<pre><code>* [ ] Second item
</code></pre>
</li>
</ul>
````````````````````````````````
Expand All @@ -3470,9 +3469,8 @@ pegdown converts second item to lazy continuation because it is indented by more
.
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" readonly="readonly" />&nbsp;First item
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" readonly="readonly" />&nbsp;Second item</li>
</ul>
<pre><code> * [ ] Second item
</code></pre>
</li>
</ul>
````````````````````````````````
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ public BlockStart tryStart(ParserState state, MatchedBlockParser matchedBlockPar
}
} else if (emulationFamily == FIXED_INDENT) {
int currentIndent = state.getIndent();
if (currentIndent >= myOptions.getCodeIndent()) {
if (currentIndent >= myOptions.getItemIndent()) {
return BlockStart.none();
}
} else if (emulationFamily == KRAMDOWN) {
Expand Down

0 comments on commit 424d3bc

Please sign in to comment.