From 073b2f5b54a05626e28ded1dd1afb59b03baf0c7 Mon Sep 17 00:00:00 2001 From: benweet Date: Wed, 20 Nov 2013 22:04:16 +0000 Subject: [PATCH] Fixed sequence of TOC in one document --- public/res/extensions/toc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/res/extensions/toc.js b/public/res/extensions/toc.js index d77c5753..5441f1cc 100644 --- a/public/res/extensions/toc.js +++ b/public/res/extensions/toc.js @@ -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');