Previously, `<code>` tags were not escaped. This was counter intuitive since ´<pre><code>` tags
were being escaped. Now both pre code and code are escaped.
Closes#339
Empty lines should not be parsed as paragraphs. This was happening
in determined circumstances.
For instance, when stripping reference style links, `\n\n` was left being,
creating an undesired empty paragraph. This commit fixes the issue.
Closes#334
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);
```
When using html pre/code tags to wrap github's fenced code block syntax,
showdown would parsed them instead of treating them like plain code.
Closes#229
This feature enables hashing span elements that should not be touched by
showdown. For instance, `<code>` tags in markdown source should not be
parsed by showdown, so the text inside them remains unchanged.
This is made possible by a new exciting internal feature,
matchRecursiveRegExp.
Closes#196, Closes#175, Partially reverts 5f043ca
The spec states that you can be lazy and only put the `>` before the first line of a hard-wrapped paragraph.
It also states that blocquotes can contain any other md element inside.
This means headings and horizontal rules should be included in the blockquote but, right now, are treated as
independent entities
Closes#191
Fix ghCodeBlocks not being correctly parsed inside lists. Also, as a side
effect, fixes issues with consecutive lists and extra paragraphs being
added into lists.
Closes#142, Closes#183, Closes#184
Some HTML5 block elements were not being properly ignored. This caused problems in rendering markdown as showdown would add additional <br /> to some block elements.
This commit should fix this issue.
Closes#90, closes#140, closes#147
If two headers have similar texts, the generated id could be equal. In order to prevent id clash:
- A unique suffix is added if a header id already exists
- Option to add a prefix to header id
- Update of correspondent tests
- (credits to nicovalencia)
Closes#81, closes#82