fix: Exclude commented headers from page contents tree

pull/98/head
NGPixel 8 years ago
parent 767896dbe4
commit 25c105cdc2

@ -94,6 +94,7 @@ const videoRules = [
* @return {Array} TOC tree * @return {Array} TOC tree
*/ */
const parseTree = (content) => { const parseTree = (content) => {
content = content.replace(/<!--(.|\t|\n|\r)*?-->/g, '')
let tokens = md().parse(content, {}) let tokens = md().parse(content, {})
let tocArray = [] let tocArray = []

Loading…
Cancel
Save