");break;case"td":nodeList.push("| ");break}},chars:function(text){if(preStack.length>0){text=text.replace(/\n/g,"\n ")}else{if(trim(text)!=""){text=text.replace(/\s+/g," ");var prevText=peekTillNotEmpty(nodeList);if(/\s+$/.test(prevText)){text=text.replace(/^\s+/g,"")}}else{nodeList.push("");return}}if(blockquoteStack.length>0){nodeList.push(blockquoteStack.join(""))}nodeList.push(text)},end:function(tag){tag=tag.toLowerCase();switch(tag){case"title":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(!removeIfEmptyTag(markdownTags[tag])){block(true)}break;case"p":case"div":case"table":case"tbody":case"tr":case"td":while(nodeList.length>0&&trim(peek(nodeList))==""){nodeList.pop()}block(true);break;case"b":case"strong":case"i":case"em":case"dfn":case"var":case"cite":if(!removeIfEmptyTag(markdownTags[tag])){nodeList.push(trim(sliceText(markdownTags[tag])));nodeList.push(markdownTags[tag])}break;case"a":var text=sliceText("[");text=text.replace(/\s+/g," ");text=trim(text);if(text==""){nodeList.pop();break}var attrs=linkAttrStack.pop();var url;attrs["href"]&&attrs["href"].value!=""?url=attrs["href"].value:url="";if(url==""){nodeList.pop();nodeList.push(text);break}nodeList.push(text);if(!inlineStyle&&!startsWith(peek(nodeList),"!")){var l=links.indexOf(url);if(l==-1){links.push(url);l=links.length-1}nodeList.push("]["+l+"]")}else{if(startsWith(peek(nodeList),"!")){var text=nodeList.pop();text=nodeList.pop()+text;block();nodeList.push(text)}var title=attrs["title"];nodeList.push("]("+url+(title?' "'+trim(title.value).replace(/\s+/g," ")+'"':"")+")");
+if(startsWith(peek(nodeList),"!")){block(true)}}break;case"ul":case"ol":case"dl":listBlock();listTagStack.pop();break;case"li":case"dt":var li=getListMarkdownTag();if(!removeIfEmptyTag(li)){var text=trim(sliceText(li));if(startsWith(text,"[![")){nodeList.pop();block();nodeList.push(text);block(true)}else{nodeList.push(text);listBlock()}}break;case"blockquote":blockquoteStack.pop();break;case"pre":block(true);preStack.pop();break;case"code":case"span":if(preStack.length>0){break}else{if(trim(peek(nodeList))==""){nodeList.pop();nodeList.push(markdownTags[tag])}else{var text=nodeList.pop();nodeList.push(trim(text));nodeList.push(markdownTags[tag])}}break;case"table":nodeList.push(" |