mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Merge remote-tracking branch 'unwiredben/master'
This commit is contained in:
commit
9075cdc080
@ -361,13 +361,13 @@ var _HashHTMLBlocks = function(text) {
|
|||||||
\b // word break
|
\b // word break
|
||||||
// attacklab: hack around khtml/pcre bug...
|
// attacklab: hack around khtml/pcre bug...
|
||||||
[^\r]*? // any number of lines, minimally matching
|
[^\r]*? // any number of lines, minimally matching
|
||||||
.*</\2> // the matching end tag
|
</\2> // the matching end tag
|
||||||
[ \t]* // trailing spaces/tabs
|
[ \t]* // trailing spaces/tabs
|
||||||
(?=\n+) // followed by a newline
|
(?=\n+) // followed by a newline
|
||||||
) // attacklab: there are sentinel newlines at end of document
|
) // attacklab: there are sentinel newlines at end of document
|
||||||
/gm,function(){...}};
|
/gm,function(){...}};
|
||||||
*/
|
*/
|
||||||
text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,hashElement);
|
text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,hashElement);
|
||||||
|
|
||||||
// Special case just for <hr />. It was easier to make a special case than
|
// Special case just for <hr />. It was easier to make a special case than
|
||||||
// to make the other regex more complicated.
|
// to make the other regex more complicated.
|
||||||
|
@ -9,8 +9,11 @@
|
|||||||
|
|
||||||
<nav>navigation</nav>
|
<nav>navigation</nav>
|
||||||
|
|
||||||
<article>read me</article>
|
<article>read
|
||||||
|
me</article>
|
||||||
|
|
||||||
<aside>ignore me</aside>
|
<aside>
|
||||||
|
ignore me
|
||||||
|
</aside>
|
||||||
|
|
||||||
<p>the end</p>
|
<p>the end</p>
|
@ -5,7 +5,10 @@ These HTML5 tags should pass through just fine.
|
|||||||
<header>head</header>
|
<header>head</header>
|
||||||
<footer>footsies</footer>
|
<footer>footsies</footer>
|
||||||
<nav>navigation</nav>
|
<nav>navigation</nav>
|
||||||
<article>read me</article>
|
<article>read
|
||||||
<aside>ignore me</aside>
|
me</article>
|
||||||
|
<aside>
|
||||||
|
ignore me
|
||||||
|
</aside>
|
||||||
|
|
||||||
the end
|
the end
|
Loading…
x
Reference in New Issue
Block a user