diff --git a/dist/js/editormd.js b/dist/js/editormd.js index b2dfae6..811d4ff 100644 --- a/dist/js/editormd.js +++ b/dist/js/editormd.js @@ -1402,17 +1402,24 @@ var text = toc[i].text; var level = toc[i].level; - if (level < startLevel) { continue; } + if (level < startLevel) { + continue; + } - if (level > lastLevel) { + if (level > lastLevel) + { html += ""; - } else if (level < lastLevel) { + } + else if (level < lastLevel) + { html += (new Array(lastLevel - level + 2)).join(""); - } else { + } + else + { html += ""; } - html += "
  • " + text + "
  • "; } - html += "
  • " + text + "