showdown/test/cases
Estevao Soares dos Santos d51be6e0b4 fix(lists): enforce 4 space indentation in sublists
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);
```
2016-11-11 07:56:29 +00:00
..
anchors-by-reference.html chore(all): code style change 2015-01-19 11:37:21 +00:00
anchors-by-reference.md Added testing suite 2012-06-13 23:05:31 -06:00
automatic-anchors.html Major code refactoring 2015-01-15 21:21:33 +00:00
automatic-anchors.md Added testing suite 2012-06-13 23:05:31 -06:00
blockquote-followed-by-code.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
blockquote-followed-by-code.md fix(blockGamut): fix for headings inside blockquotes 2015-08-23 03:11:11 +01:00
blockquote-inside-code.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
blockquote-inside-code.md fix(blockGamut): fix for headings inside blockquotes 2015-08-23 03:11:11 +01:00
blockquote-nested-markdown.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
blockquote-nested-markdown.md Added testing suite 2012-06-13 23:05:31 -06:00
blockquote.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
blockquote.md Added testing suite 2012-06-13 23:05:31 -06:00
code-block-html-escape.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
code-block-html-escape.md Added testing suite 2012-06-13 23:05:31 -06:00
code-block.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
code-block.md Added testing suite 2012-06-13 23:05:31 -06:00
doubline-list.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
doubline-list.md Added testing suite 2012-06-13 23:05:31 -06:00
emphasis.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
emphasis.md test(emphasis): add more test scenarios to emphasis 2015-01-16 23:03:38 +00:00
escaped-number-period.html chore(all): code style change 2015-01-19 11:37:21 +00:00
escaped-number-period.md chore(): code style fix and tests fix due to code style changes 2015-01-19 12:04:22 +00:00
escaping.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
escaping.md Added testing suite 2012-06-13 23:05:31 -06:00
github-style-at-start.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
github-style-at-start.md Added test case for github codeblock at start of string 2012-06-14 00:08:49 -06:00
github-style-codeblock-inside-quote.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
github-style-codeblock-inside-quote.md fix(blockQuote): fix 'github style codeblocks' not being parsed inside 'blockquote' 2015-08-25 21:10:49 +01:00
github-style-codeblock.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
github-style-codeblock.md Fixed #21 -- Github codeblocks can now contain back ticks 2012-06-14 00:09:58 -06:00
github-style-linebreaks.html chore(all): code style change 2015-01-19 11:37:21 +00:00
github-style-linebreaks.md Added test for #25. Looks to be working. 2012-08-11 07:02:41 -06:00
h1-with-double-hash.html Major code refactoring 2015-01-15 21:21:33 +00:00
h1-with-double-hash.md Added testing suite 2012-06-13 23:05:31 -06:00
h1-with-equals.html Major code refactoring 2015-01-15 21:21:33 +00:00
h1-with-equals.md Added testing suite 2012-06-13 23:05:31 -06:00
h1-with-single-hash.html Major code refactoring 2015-01-15 21:21:33 +00:00
h1-with-single-hash.md Added testing suite 2012-06-13 23:05:31 -06:00
h2-with-dashes.html Major code refactoring 2015-01-15 21:21:33 +00:00
h2-with-dashes.md Added testing suite 2012-06-13 23:05:31 -06:00
h2-with-double-hash.html Major code refactoring 2015-01-15 21:21:33 +00:00
h2-with-double-hash.md Added testing suite 2012-06-13 23:05:31 -06:00
h2-with-single-hash.html Major code refactoring 2015-01-15 21:21:33 +00:00
h2-with-single-hash.md Added testing suite 2012-06-13 23:05:31 -06:00
h3-with-double-hash.html Major code refactoring 2015-01-15 21:21:33 +00:00
h3-with-double-hash.md Added testing suite 2012-06-13 23:05:31 -06:00
h3-with-single-hash.html Major code refactoring 2015-01-15 21:21:33 +00:00
h3-with-single-hash.md Added testing suite 2012-06-13 23:05:31 -06:00
h4-with-single-hash.html Major code refactoring 2015-01-15 21:21:33 +00:00
h4-with-single-hash.md Added testing suite 2012-06-13 23:05:31 -06:00
h5-with-single-hash.html Major code refactoring 2015-01-15 21:21:33 +00:00
h5-with-single-hash.md Added testing suite 2012-06-13 23:05:31 -06:00
h6-with-single-hash.html Major code refactoring 2015-01-15 21:21:33 +00:00
h6-with-single-hash.md Added testing suite 2012-06-13 23:05:31 -06:00
horizontal-rules.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
horizontal-rules.md Added testing suite 2012-06-13 23:05:31 -06:00
html-comments.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
html-comments.md fix(parser): fix issue with comments inside nested code blocks 2016-08-30 06:07:57 +01:00
html-inside-listed-code.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
html-inside-listed-code.md fix(parser): fix issue with comments inside nested code blocks 2016-08-30 06:07:57 +01:00
html5-strutural-tags.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
html5-strutural-tags.md chore(tests) fix test that didn't merge correctly 2015-05-14 03:04:52 +01:00
images.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
images.md Added testing suite 2012-06-13 23:05:31 -06:00
implicit-anchors.html chore(): code style fix and tests fix due to code style changes 2015-01-19 12:04:22 +00:00
implicit-anchors.md Added testing suite 2012-06-13 23:05:31 -06:00
inline-anchors.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
inline-anchors.md Added testing suite 2012-06-13 23:05:31 -06:00
inline-code.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
inline-code.md Added testing suite 2012-06-13 23:05:31 -06:00
inline-escaped-chars.html chore(all): code style change 2015-01-19 11:37:21 +00:00
inline-escaped-chars.md Added test case for #10 -- Seems to be working correctly 2012-06-14 00:44:58 -06:00
inline-style-tag.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
inline-style-tag.md Fixed #11 -- <style> tags are now not wrapped in <p>'s + test case for this 2012-06-14 00:42:15 -06:00
lazy-blockquote.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
lazy-blockquote.md Added testing suite 2012-06-13 23:05:31 -06:00
line-starts-with-html.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
line-starts-with-html.md fix(parser): fix issue with comments inside nested code blocks 2016-08-30 06:07:57 +01:00
list-followed-by-blockquote.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
list-followed-by-blockquote.md fix(lists): fix github code blocks not being parsed inside lists 2015-08-01 21:05:28 +01:00
list-followed-by-ghcode.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
list-followed-by-ghcode.md fix(lists): fix github code blocks not being parsed inside lists 2015-08-01 21:05:28 +01:00
list-with-blockquote.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
list-with-blockquote.md Added testing suite 2012-06-13 23:05:31 -06:00
list-with-code.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
list-with-code.md Added testing suite 2012-06-13 23:05:31 -06:00
literal-html-tags.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
literal-html-tags.md feat(hashHTMLSpans): Add support for hashing span elements 2015-10-19 01:55:35 +01:00
multi-paragraph-list.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
multi-paragraph-list.md Added testing suite 2012-06-13 23:05:31 -06:00
multiline-unordered-list.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
multiline-unordered-list.md Added testing suite 2012-06-13 23:05:31 -06:00
nested-blockquote.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
nested-blockquote.md Updated nested blockquote test case to proper markdown syntax 2012-06-14 00:35:47 -06:00
ordered-list-same-number.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
ordered-list-same-number.md Added testing suite 2012-06-13 23:05:31 -06:00
ordered-list-wrong-numbers.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
ordered-list-wrong-numbers.md Added testing suite 2012-06-13 23:05:31 -06:00
ordered-list.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
ordered-list.md Added testing suite 2012-06-13 23:05:31 -06:00
paragraphed-list-with-sublists.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
paragraphed-list-with-sublists.md fix(lists): enforce 4 space indentation in sublists 2016-11-11 07:56:29 +00:00
pre-code-tags-inside-code-block.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
pre-code-tags-inside-code-block.md fix(HTMLParser): fix code tags parsing 2016-01-25 03:01:54 +00:00
pre-code-tags.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
pre-code-tags.md fix(HTMLParser): fix code tags parsing 2016-01-25 03:01:54 +00:00
relative-anchors.html Major code refactoring 2015-01-15 21:21:33 +00:00
relative-anchors.md Added testing suite 2012-06-13 23:05:31 -06:00
repeated-headers.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
repeated-headers.md feat(uniqueHeaderId): add unique id prefix and suffix to headers 2015-01-18 02:12:32 +00:00
simple-paragraph.html Major code refactoring 2015-01-15 21:21:33 +00:00
simple-paragraph.md Added testing suite 2012-06-13 23:05:31 -06:00
strong.html fix(double linebreaks): fix double linebreaks in html output 2016-09-29 00:50:58 +01:00
strong.md Added testing suite 2012-06-13 23:05:31 -06:00
unordered-list-asterisk.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
unordered-list-asterisk.md Added testing suite 2012-06-13 23:05:31 -06:00
unordered-list-minus.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
unordered-list-minus.md Added testing suite 2012-06-13 23:05:31 -06:00
unordered-list-plus.html fix(lists linebreaks): fix lists linebreaks in html output 2016-09-29 01:12:27 +01:00
unordered-list-plus.md Added testing suite 2012-06-13 23:05:31 -06:00
url-with-parenthesis.html chore(): code style fix and tests fix due to code style changes 2015-01-19 12:04:22 +00:00
url-with-parenthesis.md chore(): code style fix and tests fix due to code style changes 2015-01-19 12:04:22 +00:00