mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
d51be6e0b4
Acording to the spec, multi paragraph (or block) list item requires subblocks to be indented 4 spaces (or 1 tab). Although, this is mentioned in the documentation, Showdown didn't enforce this rule in sublists because other implementations, such as GFM also didn't. However, in some edge cases, this led to inconsistent behavior, as shown in issue #299. This commit makes 4 space indentation in sublists mandatory. BREAKING CHANGE: syntax for sublists is more restrictive. Before, sublists SHOULD be indented by 4 spaces, but indenting 2 spaces would work. Now, sublists MUST be indented 4 spaces or they won't work. With this input: ```md * one * two * three ``` Before (ouput): ```html <ul> <li>one <ul> <li>two <ul><li>three</li></ul> <li> </ul> </li> <ul> ``` After (output): ```html <ul> <li>one</li> <li>two <ul><li>three</li></ul> </li> </ul> ``` To migrate either fix source md files or activate the option `disableForced4SpacesIndentedSublists` (coming in v1.5.0): ```md showdown.setOption('disableForced4SpacesIndentedSublists', true); ``` |
||
---|---|---|
.. | ||
#83.parsed-text-links-with-underscores.html | ||
#83.parsed-text-links-with-underscores.md | ||
#96.underscores-in-links.html | ||
#96.underscores-in-links.md | ||
#107.inner-underscore-parse-to-block.html | ||
#107.inner-underscore-parse-to-block.md | ||
#142.odd-behaviour-for-multiple-consecutive-lists.html | ||
#142.odd-behaviour-for-multiple-consecutive-lists.md | ||
#150.hyphens-are-getting-removed.html | ||
#150.hyphens-are-getting-removed.md | ||
#183.gh-code-blocks-within-lists-do-not-render-properly.html | ||
#183.gh-code-blocks-within-lists-do-not-render-properly.md | ||
#191.blockquote-followed-by-an-heading.html | ||
#191.blockquote-followed-by-an-heading.md | ||
#196.entity-in-code-block-in-nested-list.html | ||
#196.entity-in-code-block-in-nested-list.md | ||
#220.html-breaks-markdown-parsing.html | ||
#220.html-breaks-markdown-parsing.md | ||
#229.2.code-being-parsed-inside-HTML-code-tags.html | ||
#229.2.code-being-parsed-inside-HTML-code-tags.md | ||
#229.code-being-parsed-inside-HTML-code-tags.html | ||
#229.code-being-parsed-inside-HTML-code-tags.md | ||
#230.paragraphs-are-ignored-between-code-tags.html | ||
#230.paragraphs-are-ignored-between-code-tags.md | ||
#261.mix-images-with-links.html | ||
#261.mix-images-with-links.md | ||
#261.reference-style-image-after-inline-style-image-does-not-work-correctely.html | ||
#261.reference-style-image-after-inline-style-image-does-not-work-correctely.md | ||
#261.reference-style-link-after-inline-style-link-does-not-work-correctely.html | ||
#261.reference-style-link-after-inline-style-link-does-not-work-correctely.md | ||
#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.html | ||
#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.md | ||
#299.nested-ordered-unordered-list-inconsistent-behavior-2.html | ||
#299.nested-ordered-unordered-list-inconsistent-behavior-2.md | ||
#299.nested-ordered-unordered-list-inconsistent-behavior-3.html | ||
#299.nested-ordered-unordered-list-inconsistent-behavior-3.md | ||
#299.nested-ordered-unordered-list-inconsistent-behavior.html | ||
#299.nested-ordered-unordered-list-inconsistent-behavior.md |