Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
https://markdown-it.github.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
1.0 KiB
85 lines
1.0 KiB
Should parse nested quotes:
|
|
|
|
.
|
|
"foo 'bar' baz"
|
|
.
|
|
<p>“foo ‘bar’ baz”</p>
|
|
.
|
|
|
|
.
|
|
'foo 'bar' baz'
|
|
.
|
|
<p>‘foo ‘bar’ baz’</p>
|
|
.
|
|
|
|
|
|
Should not overlap quotes:
|
|
|
|
.
|
|
'foo "bar' baz"
|
|
.
|
|
<p>‘foo "bar’ baz"</p>
|
|
.
|
|
|
|
|
|
Should match quotes on the same level:
|
|
|
|
.
|
|
"foo *bar* baz"
|
|
.
|
|
<p>“foo <em>bar</em> baz”</p>
|
|
.
|
|
|
|
|
|
Should not match quotes on different levels:
|
|
|
|
.
|
|
*"foo* bar"
|
|
|
|
"foo *bar"*
|
|
.
|
|
<p><em>"foo</em> bar"</p>
|
|
<p>"foo <em>bar"</em></p>
|
|
.
|
|
|
|
.
|
|
*"foo* bar *baz"*
|
|
.
|
|
<p><em>"foo</em> bar <em>baz"</em></p>
|
|
.
|
|
|
|
|
|
Should try and find matching quote in this case:
|
|
|
|
.
|
|
"foo "bar 'baz"
|
|
.
|
|
<p>"foo “bar 'baz”</p>
|
|
.
|
|
|
|
|
|
Should not touch 'inches' in quotes:
|
|
|
|
.
|
|
"Monitor 21""
|
|
.
|
|
<p>“Monitor 21"”</p>
|
|
.
|
|
|
|
|
|
Should render an apostrophe as a rsquo:
|
|
|
|
.
|
|
This isn't and can't be the best approach to implement this...
|
|
.
|
|
<p>This isn’t and can’t be the best approach to implement this…</p>
|
|
.
|
|
|
|
|
|
Apostrophe could end the word, that's why original smartypants replaces all of them as rsquo:
|
|
|
|
.
|
|
users' stuff
|
|
.
|
|
<p>users’ stuff</p>
|
|
.
|
|
|