Fixed sequence of TOC in one document

This commit is contained in:
benweet 2013-11-20 22:04:16 +00:00
parent e4d07f0afc
commit 073b2f5b54

View File

@ -116,7 +116,7 @@ define([
toc.onPagedownConfigure = function(editor) {
previewContentsElt = document.getElementById('preview-contents');
var tocExp = new RegExp("^" + toc.config.marker + "$", "g");
var tocExp = new RegExp("^" + toc.config.marker + "$");
// Run TOC generation when conversion is finished directly on HTML
editor.hooks.chain("onPreviewRefresh", function() {
var tocEltList = document.querySelectorAll('.table-of-contents, .toc');