diff --git a/lib/markdown.js b/lib/markdown.js index da5d29cc..e915e6ee 100644 --- a/lib/markdown.js +++ b/lib/markdown.js @@ -287,6 +287,11 @@ Markdown.dialects = {}; **/ Markdown.dialects.Gruber = { block: { + htmlBlock: function htmlBlock( block, next ) { + if ( block.match( /^\s*<\w/ ) && block.match( /<\/\s*\w+\s*>\s*$/ ) ) + return [["__RAW", block.toString()]]; + }, + atxHeader: function atxHeader( block, next ) { var m = block.match( /^(#{1,6})\s*(.*?)\s*#*\s*(?:\n|$)/ ); @@ -1293,6 +1298,9 @@ function render_tree( jsonml ) { if ( typeof jsonml === "string" ) { return escapeHTML( jsonml ); } + if ( jsonml[0] == "__RAW" ) { + return jsonml[1]; + } var tag = jsonml.shift(), attributes = {},