浏览代码

fix:兼容老文档的TOC

lifei6671 7 年之前
父节点
当前提交
2afc88c31f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      static/editor.md/editormd.js

+ 1 - 1
static/editor.md/editormd.js

@@ -3765,7 +3765,7 @@
                 text = (isTeXLine) ? text.replace(/\$/g, "") : text;
                 text = (isTeXLine) ? text.replace(/\$/g, "") : text;
             }
             }
 
 
-            var tocHTML = "<div class=\"markdown-toc editormd-markdown-toc\">" + text + "</div><div class=\"markdown-article\">";
+            var tocHTML = "<div class=\"markdown-toc editormd-markdown-toc\">" + text + "</div>";
 
 
             return (isToC) ? ( (isToCMenu) ? "<div class=\"editormd-toc-menu\">" + tocHTML + "</div><br/>" : tocHTML )
             return (isToC) ? ( (isToCMenu) ? "<div class=\"editormd-toc-menu\">" + tocHTML + "</div><br/>" : tocHTML )
                            : ( (pageBreakReg.test(text)) ? this.pageBreak(text) : "<p" + isTeXAddClass + ">" + this.atLink(this.emoji(text)) + "</p>\n" );
                            : ( (pageBreakReg.test(text)) ? this.pageBreak(text) : "<p" + isTeXAddClass + ">" + this.atLink(this.emoji(text)) + "</p>\n" );