';headingHTML+='';headingHTML+='';headingHTML+=hasLinkReg?this.atLink(this.emoji(linkText)):this.atLink(this.emoji(text));headingHTML+="";return headingHTML};markedRenderer.pageBreak=function(text){if(pageBreakReg.test(text)&&settings.pageBreak){text='
'}return text};markedRenderer.paragraph=function(text){var isTeXInline=/\$\$(.*)\$\$/g.test(text);var isTeXLine=/^\$\$(.*)\$\$$/.test(text);var isTeXAddClass=isTeXLine?' class="'+editormd.classNames.tex+'"':"";var isToC=settings.tocm?/^(\[TOC\]|\[TOCM\])$/.test(text):/^\[TOC\]$/.test(text);var isToCMenu=/^\[TOCM\]$/.test(text);if(!isTeXLine&&isTeXInline){text=text.replace(/(\$\$([^\$]*)\$\$)+/g,function($1,$2){return''+$2.replace(/\$/g,"")+""})}else{text=isTeXLine?text.replace(/\$/g,""):text}var tocHTML=''+text+"
";return isToC?isToCMenu?'
":tocHTML:pageBreakReg.test(text)?this.pageBreak(text):""+this.atLink(this.emoji(text))+"
\n"};markedRenderer.code=function(code,lang,escaped){if(lang==="seq"||lang==="sequence"){return''+code+"
"}else if(lang==="flow"){return''+code+"
"}else if(lang==="math"||lang==="latex"||lang==="katex"){return''+code+"
"}else if(lang==="plantuml"&&settings.plantuml){const encoded=editormd.$plantumlEncoder.encode(code);return`
`}else{return marked.Renderer.prototype.code.apply(this,arguments)}};markedRenderer.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+this.atLink(this.emoji(content))+""+type+">\n"};markedRenderer.listitem=function(text){if(settings.taskList&&/^\s*\[[x\s]\]\s*/.test(text)){text=text.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' ');return''+this.atLink(this.emoji(text))+""}else{return""+this.atLink(this.emoji(text))+""}};return markedRenderer};editormd.markdownToCRenderer=function(toc,container,tocDropdown,startLevel){var html="";var lastLevel=0;var classPrefix=this.classPrefix;startLevel=startLevel||1;for(var i=0,len=toc.length;ilastLevel){html+=""}else if(level")}else{html+=""}html+=''+text+"";lastLevel=level}var tocContainer=container.find(".markdown-toc");if(tocContainer.length<1&&container.attr("previewContainer")==="false"){var tocHTML='';tocHTML=tocDropdown?'":tocHTML;container.html(tocHTML);tocContainer=container.find(".markdown-toc")}if(tocDropdown){tocContainer.wrap('
')}tocContainer.html('').children(".markdown-toc-list").html(html.replace(/\r?\n?\\<\/ul\>/g,""));return tocContainer};editormd.tocDropdownMenu=function(container,tocTitle){tocTitle=tocTitle||"Table of Contents";var zindex=400;var tocMenus=container.find("."+this.classPrefix+"toc-menu");tocMenus.each(function(){var $this=$(this);var toc=$this.children(".markdown-toc");var icon='';var btn='";var menu=toc.children("ul");var list=menu.find("li");toc.append(btn);list.first().before(""+tocTitle+" "+icon+"
");$this.mouseover(function(){menu.show();list.each(function(){var li=$(this);var ul=li.children("ul");if(ul.html()===""){ul.remove()}if(ul.length>0&&ul.html()!==""){var firstA=li.children("a").first();if(firstA.children(".fa").length<1){firstA.append($(icon).css({float:"right",paddingTop:"4px"}))}}li.mouseover(function(){ul.css("z-index",zindex).show();zindex+=1}).mouseleave(function(){ul.hide()})})}).mouseleave(function(){menu.hide()})});return tocMenus};editormd.filterHTMLTags=function(html,filters){if(typeof html!=="string"){html=new String(html)}if(typeof filters!=="string"){return html}var expression=filters.split("|");var filterTags=expression[0].split(",");var attrs=expression[1];for(var i=0,len=filterTags.length;i]*)>([^>]*)","igm"),"")}if(typeof attrs!=="undefined"){html=html.replace(/(\w+)="([^"]*)"/g,(match,key,value)=>{const escapedValue=value.replace(//g,">");return`${key}="${escapedValue}"`});var htmlTagRegex=/\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/gi;if(attrs==="*"){html=html.replace(htmlTagRegex,function($1,$2,$3,$4,$5){return"<"+$2+">"+$4+""+$5+">"})}else if(attrs==="on*"){html=html.replace(htmlTagRegex,function($1,$2,$3,$4,$5){var el=$("<"+$2+">"+$4+""+$5+">");var _attrs=$($1)[0].attributes;var $attrs={};$.each(_attrs,function(i,e){if(e.nodeName!=='"')$attrs[e.nodeName]=e.nodeValue});$.each($attrs,function(i){if(i.indexOf("on")===0){delete $attrs[i]}});el.attr($attrs);var text=typeof el[1]!=="undefined"?$(el[1]).text():"";return el[0].outerHTML+text})}else{html=html.replace(htmlTagRegex,function($1,$2,$3,$4){var filterAttrs=attrs.split(",");var el=$($1);el.html($4);$.each(filterAttrs,function(i){el.attr(filterAttrs[i],null)});return el[0].outerHTML})}}return html};editormd.markdownToHTML=function(id,options){var defaults={gfm:true,toc:true,tocm:false,tocStartLevel:1,tocTitle:"目录",tocDropdown:false,tocContainer:"",markdown:"",markdownSourceCode:false,htmlDecode:false,autoLoadKaTeX:true,pageBreak:true,atLink:true,emailLink:true,tex:false,taskList:false,emoji:false,flowChart:false,sequenceDiagram:false,previewCodeHighlight:true};editormd.$marked=marked;var div=$("#"+id);var settings=div.settings=$.extend(true,defaults,options||{});var saveTo=div.find("textarea");if(saveTo.length<1){div.append("");saveTo=div.find("textarea")}var markdownDoc=settings.markdown===""?saveTo.val():settings.markdown;var markdownToC=[];var rendererOptions={toc:settings.toc,tocm:settings.tocm,tocStartLevel:settings.tocStartLevel,taskList:settings.taskList,emoji:settings.emoji,tex:settings.tex,pageBreak:settings.pageBreak,atLink:settings.atLink,emailLink:settings.emailLink,plantuml:settings.plantuml,flowChart:settings.flowChart,sequenceDiagram:settings.sequenceDiagram,previewCodeHighlight:settings.previewCodeHighlight};var markedOptions={renderer:editormd.markedRenderer(markdownToC,rendererOptions),gfm:settings.gfm,tables:true,breaks:true,pedantic:false,sanitize:settings.htmlDecode?false:true,smartLists:true,smartypants:true};markdownDoc=new String(markdownDoc);var markdownParsed=marked(markdownDoc,markedOptions);markdownParsed=editormd.filterHTMLTags(markdownParsed,settings.htmlDecode);if(settings.markdownSourceCode){saveTo.text(markdownDoc)}else{saveTo.remove()}div.addClass("markdown-body "+this.classPrefix+"html-preview").append(markdownParsed);var tocContainer=settings.tocContainer!==""?$(settings.tocContainer):div;if(settings.tocContainer!==""){tocContainer.attr("previewContainer",false)}if(settings.toc){div.tocContainer=this.markdownToCRenderer(markdownToC,tocContainer,settings.tocDropdown,settings.tocStartLevel);if(settings.tocDropdown||div.find("."+this.classPrefix+"toc-menu").length>0){this.tocDropdownMenu(div,settings.tocTitle)}if(settings.tocContainer!==""){div.find(".editormd-toc-menu, .editormd-markdown-toc").remove()}}if(settings.previewCodeHighlight){div.find("pre").addClass("prettyprint linenums");prettyPrint()}if(!editormd.isIE8){if(settings.flowChart){div.find(".flowchart").flowChart()}if(settings.sequenceDiagram){div.find(".sequence-diagram").sequenceDiagram({theme:"simple"})}}if(settings.tex){var katexHandle=function(){div.find("."+editormd.classNames.tex).each(function(){var tex=$(this);katex.render(tex.html().replace(/</g,"<").replace(/>/g,">"),tex[0]);tex.find(".katex").css("font-size","1.6em")})};if(settings.autoLoadKaTeX&&!editormd.$katex&&!editormd.kaTeXLoaded){this.loadKaTeX(function(){editormd.$katex=katex;editormd.kaTeXLoaded=true;katexHandle()})}else{katexHandle()}}div.getMarkdown=function(){return saveTo.val()};return div};editormd.themes=["default","dark"];editormd.previewThemes=["default","dark"];editormd.editorThemes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"];editormd.loadPlugins={};editormd.loadFiles={js:[],css:[],plugin:[]};editormd.loadPlugin=function(fileName,callback,into){callback=callback||function(){};this.loadScript(fileName,function(){editormd.loadFiles.plugin.push(fileName);callback()},into)};editormd.loadCSS=function(fileName,callback,into){into=into||"head";callback=callback||function(){};var css=document.createElement("link");css.type="text/css";css.rel="stylesheet";css.onload=css.onreadystatechange=function(){editormd.loadFiles.css.push(fileName);callback()};css.href=fileName+".css";if(into==="head"){document.getElementsByTagName("head")[0].appendChild(css)}else{document.body.appendChild(css)}};editormd.isIE=navigator.appName=="Microsoft Internet Explorer";editormd.isIE8=editormd.isIE&&navigator.appVersion.match(/8./i)=="8.";editormd.loadScript=function(fileName,callback,into){into=into||"head";callback=callback||function(){};var script=null;script=document.createElement("script");script.id=fileName.replace(/[\./]+/g,"-");script.type="text/javascript";script.src=fileName+".js";if(editormd.isIE8){script.onreadystatechange=function(){if(script.readyState){if(script.readyState==="loaded"||script.readyState==="complete"){script.onreadystatechange=null;editormd.loadFiles.js.push(fileName);callback()}}}}else{script.onload=function(){editormd.loadFiles.js.push(fileName);callback()}}if(into==="head"){document.getElementsByTagName("head")[0].appendChild(script)}else{document.body.appendChild(script)}};editormd.katexURL={css:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min",js:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min"};editormd.kaTeXLoaded=false;editormd.loadKaTeX=function(callback){editormd.loadCSS(editormd.katexURL.css,function(){editormd.loadScript(editormd.katexURL.js,callback||function(){})})};editormd.lockScreen=function(lock){$("html,body").css("overflow",lock?"hidden":"")};editormd.createDialog=function(options){var defaults={name:"",width:420,height:240,title:"",drag:true,closed:true,content:"",mask:true,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:true,footer:true,buttons:false};options=$.extend(true,defaults,options);var $this=this;var editor=this.editor;var classPrefix=editormd.classPrefix;var guid=(new Date).getTime();var dialogName=options.name===""?classPrefix+"dialog-"+guid:options.name;var mouseOrTouch=editormd.mouseOrTouch;var html='';if(options.title!==""){html+='"}if(options.closed){html+='
'}html+='
'+options.content;if(options.footer||typeof options.footer==="string"){html+='"}html+="
";html+='
';html+='
';html+="
";editor.append(html);var dialog=editor.find("."+dialogName);dialog.lockScreen=function(lock){if(options.lockScreen){$("html,body").css("overflow",lock?"hidden":"");$this.resize()}return dialog};dialog.showMask=function(){if(options.mask){editor.find("."+classPrefix+"mask").css(options.maskStyle).css("z-index",editormd.dialogZindex-1).show()}return dialog};dialog.hideMask=function(){if(options.mask){editor.find("."+classPrefix+"mask").hide()}return dialog};dialog.loading=function(show){var loading=dialog.find("."+classPrefix+"dialog-mask");loading[show?"show":"hide"]();return dialog};dialog.lockScreen(true).showMask();dialog.show().css({zIndex:editormd.dialogZindex,border:editormd.isIE8?"1px solid #ddd":"",width:typeof options.width==="number"?options.width+"px":options.width,height:typeof options.height==="number"?options.height+"px":options.height});var dialogPosition=function(){dialog.css({top:($(window).height()-dialog.height())/2+"px",left:($(window).width()-dialog.width())/2+"px"})};dialogPosition();$(window).resize(dialogPosition);dialog.children("."+classPrefix+"dialog-close").bind(mouseOrTouch("click","touchend"),function(){dialog.hide().lockScreen(false).hideMask()});if(typeof options.buttons==="object"){var footer=dialog.footer=dialog.find("."+classPrefix+"dialog-footer");for(var key in options.buttons){var btn=options.buttons[key];var btnClassName=classPrefix+key+"-btn";footer.append('");btn[1]=$.proxy(btn[1],dialog);footer.children("."+btnClassName).bind(mouseOrTouch("click","touchend"),btn[1])}}if(options.title!==""&&options.drag){var posX,posY;var dialogHeader=dialog.children("."+classPrefix+"dialog-header");if(!options.mask){dialogHeader.bind(mouseOrTouch("click","touchend"),function(){editormd.dialogZindex+=2;dialog.css("z-index",editormd.dialogZindex)})}dialogHeader.mousedown(function(e){e=e||window.event;posX=e.clientX-parseInt(dialog[0].style.left);posY=e.clientY-parseInt(dialog[0].style.top);document.onmousemove=moveAction});var userCanSelect=function(obj){obj.removeClass(classPrefix+"user-unselect").off("selectstart")};var userUnselect=function(obj){obj.addClass(classPrefix+"user-unselect").on("selectstart",function(event){return false})};var moveAction=function(e){e=e||window.event;var left,top,nowLeft=parseInt(dialog[0].style.left),nowTop=parseInt(dialog[0].style.top);if(nowLeft>=0){if(nowLeft+dialog.width()<=$(window).width()){left=e.clientX-posX}else{left=$(window).width()-dialog.width();document.onmousemove=null}}else{left=0;document.onmousemove=null}if(nowTop>=0){top=e.clientY-posY}else{top=0;document.onmousemove=null}document.onselectstart=function(){return false};userUnselect($("body"));userUnselect(dialog);dialog[0].style.left=left+"px";dialog[0].style.top=top+"px"};document.onmouseup=function(){userCanSelect($("body"));userCanSelect(dialog);document.onselectstart=null;document.onmousemove=null};dialogHeader.touchDraggable=function(){var offset=null;var start=function(e){var orig=e.originalEvent;var pos=$(this).parent().position();offset={x:orig.changedTouches[0].pageX-pos.left,y:orig.changedTouches[0].pageY-pos.top}};var move=function(e){e.preventDefault();var orig=e.originalEvent;$(this).parent().css({top:orig.changedTouches[0].pageY-offset.y,left:orig.changedTouches[0].pageX-offset.x})};this.bind("touchstart",start).bind("touchmove",move)};dialogHeader.touchDraggable()}editormd.dialogZindex+=2;return dialog};editormd.mouseOrTouch=function(mouseEventType,touchEventType){mouseEventType=mouseEventType||"click";touchEventType=touchEventType||"touchend";var eventType=mouseEventType;try{document.createEvent("TouchEvent");eventType=touchEventType}catch(e){}return eventType};editormd.dateFormat=function(format){format=format||"";var addZero=function(d){return d<10?"0"+d:d};var date=new Date;var year=date.getFullYear();var year2=year.toString().slice(2,4);var month=addZero(date.getMonth()+1);var day=addZero(date.getDate());var weekDay=date.getDay();var hour=addZero(date.getHours());var min=addZero(date.getMinutes());var second=addZero(date.getSeconds());var ms=addZero(date.getMilliseconds());var datefmt="";var ymd=year2+"-"+month+"-"+day;var fymd=year+"-"+month+"-"+day;var hms=hour+":"+min+":"+second;switch(format){case"UNIX Time":datefmt=date.getTime();break;case"UTC":datefmt=date.toUTCString();break;case"yy":datefmt=year2;break;case"year":case"yyyy":datefmt=year;break;case"month":case"mm":datefmt=month;break;case"cn-week-day":case"cn-wd":var cnWeekDays=["日","一","二","三","四","五","六"];datefmt="星期"+cnWeekDays[weekDay];break;case"week-day":case"wd":var weekDays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];datefmt=weekDays[weekDay];break;case"day":case"dd":datefmt=day;break;case"hour":case"hh":datefmt=hour;break;case"min":case"ii":datefmt=min;break;case"second":case"ss":datefmt=second;break;case"ms":datefmt=ms;break;case"yy-mm-dd":datefmt=ymd;break;case"yyyy-mm-dd":datefmt=fymd;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":datefmt=fymd+" "+hms+" "+ms;break;case"full":case"yyyy-mm-dd h:i:s":default:datefmt=fymd+" "+hms;break}return datefmt};return editormd});
\ No newline at end of file
diff --git a/public/static/editor.md/src/editormd.js b/public/static/editor.md/src/editormd.js
index 751596f..e1140f5 100644
--- a/public/static/editor.md/src/editormd.js
+++ b/public/static/editor.md/src/editormd.js
@@ -3575,7 +3575,7 @@
}
}
- var out = "