Horizontal rule syntax allows up to 3 spaces preceding dashes or
asterisks. Commit da8fb53 wrongfully removed that. This commit
puts that back.
Closes#317
This input: `- - - a` causes trouble for the parser,
since it interprets it as multiple sublists, where it should
only interpert it as a list with a single list item.
This commit fixes this behavior.
Closes#312
This option enables linebreaks to always be treated as `<br />` tags
without needing to add spaces in front of the line, the same way GitHub does.
Closes#206
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);
```
Nested ul and ol lists behave inconsistently in the requirement
of having 3 spaces to be considered a nested list.
This fix changes the requirement to only one space in
both cases.
Closes#299
Using the simplifiedAutoLink option does not return the expected GFM behaviour when parsing links without a http prefix.
Previously, `www.google.com` would be parsed into `<a href="www.google.com">www.google.com</a>`.
With this fix, showdown behaves like GFM, and the result is `<a href="http://www.google.com">www.google.com</a>`
Closes#284, closes#285
When an html comment was followed by a a long line of dashes, it would
freeze the parser as the lookahead in the html comment parser regex was
very slow. The regex was modified and simplified, so no lookahead is
needed anymore.
Closes#276