修复文档包含Python注释代码块时,生成页内目录异常的bug

This commit is contained in:
yaoxuanzhi 2018-03-24 17:36:53 +08:00
parent ee8d5175f5
commit 63a3e5bf21
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ const pageCatalogue = (function () {
* @private
*/
_extract: function (arc) {
arc = arc.replace(/(```[\s\S\D]*?```)/g,'');
let lines = arc.split('\n');
if (lines.length === 1) {
lines = lines[0].split('\r');
@ -84,4 +85,4 @@ const pageCatalogue = (function () {
}
})();
module.exports = pageCatalogue;
module.exports = pageCatalogue;