diff --git a/dist/showdown.js b/dist/showdown.js index bc3fdfd..c88587b 100644 Binary files a/dist/showdown.js and b/dist/showdown.js differ diff --git a/dist/showdown.js.map b/dist/showdown.js.map index 80b1bbd..eab8e36 100644 Binary files a/dist/showdown.js.map and b/dist/showdown.js.map differ diff --git a/dist/showdown.min.js b/dist/showdown.min.js index 96fab4c..5f33dd9 100644 Binary files a/dist/showdown.min.js and b/dist/showdown.min.js differ diff --git a/dist/showdown.min.js.map b/dist/showdown.min.js.map index 2755ae6..5efb50b 100644 Binary files a/dist/showdown.min.js.map and b/dist/showdown.min.js.map differ diff --git a/src/subParsers/hashHTMLBlocks.js b/src/subParsers/hashHTMLBlocks.js index 27aa8b6..de640a4 100644 --- a/src/subParsers/hashHTMLBlocks.js +++ b/src/subParsers/hashHTMLBlocks.js @@ -63,7 +63,7 @@ showdown.subParser('hashHTMLBlocks', function (text, options, globals) { ) // attacklab: there are sentinel newlines at end of document /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, + 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|address|audio|canvas|figure|hgroup|output|video)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm, showdown.subParser('hashElement')(text, options, globals)); // Special case just for
. It was easier to make a special case than diff --git a/test/cases/html5-strutural-tags.html b/test/cases/html5-strutural-tags.html index 372c7f3..5b351d3 100644 --- a/test/cases/html5-strutural-tags.html +++ b/test/cases/html5-strutural-tags.html @@ -20,3 +20,56 @@

the end

+ + + + + + + + +
Foo
Bar
+ + + + + + + + + + + + + + + +
Foo
Bar
Bar
+ + + + + +
My street
+ + + Sorry, your browser doesn't support the <canvas> element. + + +
+ An awesome picture +
Caption for the awesome picture
+
+ +
+

Main title

+

Secondary title

+
+ + diff --git a/test/cases/html5-strutural-tags.md b/test/cases/html5-strutural-tags.md index 5b27728..c326836 100644 --- a/test/cases/html5-strutural-tags.md +++ b/test/cases/html5-strutural-tags.md @@ -13,4 +13,57 @@ me ignore me -the end \ No newline at end of file +the end + + + + + + + + +
Foo
Bar
+ + + + + + + + + + + + + + + +
Foo
Bar
Bar
+ + + + + +
My street
+ + + Sorry, your browser doesn't support the <canvas> element. + + +
+ An awesome picture +
Caption for the awesome picture
+
+ +
+

Main title

+

Secondary title

+
+ + \ No newline at end of file