修复文档包含Python注释代码块时,生成页内目录异常的bug
This commit is contained in:
parent
ee8d5175f5
commit
63a3e5bf21
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue