Procházet zdrojové kódy

fix: Exclude commented headers from page contents tree

NGPixel před 8 roky
rodič
revize
25c105cdc2
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      server/libs/markdown.js

+ 1 - 0
server/libs/markdown.js

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