diff --git a/lib/markdown.js b/lib/markdown.js index 75ce6501..4e68714c 100644 --- a/lib/markdown.js +++ b/lib/markdown.js @@ -1452,6 +1452,11 @@ function render_tree( jsonml ) { content.push( render_tree( jsonml.shift() ) ); } + // edge case where tag has been removed at some point (e.g. preprocessTreeNode) + if ( !tag ) { + return content + } + var tag_attrs = ""; for ( var a in attributes ) { tag_attrs += " " + a + '="' + escapeHTML( attributes[ a ] ) + '"';