Fix toc id naming to avoid overlap with user toc

This commit is contained in:
Wu Cheng-Han 2016-08-15 11:27:32 +08:00
parent a013c9d3bc
commit b4ad011dc1
6 changed files with 18 additions and 18 deletions

View file

@ -21,7 +21,7 @@ if (md.meta.type && md.meta.type === 'slide') {
}
// only render again when meta changed
if (JSON.stringify(md.meta) != JSON.stringify(lastMeta)) {
parseMeta(md, null, markdown, $('#toc'), $('#toc-affix'));
parseMeta(md, null, markdown, $('#ui-toc'), $('#ui-toc-affix'));
rendered = md.render(text);
}
// prevent XSS
@ -34,8 +34,8 @@ finishView(markdown);
autoLinkify(markdown);
deduplicatedHeaderId(markdown);
renderTOC(markdown);
generateToc('toc');
generateToc('toc-affix');
generateToc('ui-toc');
generateToc('ui-toc-affix');
smoothHashScroll();
createtime = lastchangeui.time.attr('data-createtime');
lastchangetime = lastchangeui.time.attr('data-updatetime');