@technote-space/doctoc
Advanced tools
Comparing version
@@ -44,3 +44,3 @@ "use strict"; | ||
const shouldEscape = (header) => /^#+\s+/.test(header.raw) && !/\s+#+$/.test(header.raw) && header.children.length === 1 && header.children[0].type === md.Syntax.Str; | ||
const escapeHeader = (header) => md.parse(header.raw.replace(/^#+\s+/, '').replace('#', '#').replace('#', '#').replace(']', ']').replace('[', '[')); | ||
const escapeHeader = (header) => md.parse(header.raw.replace(/^#+\s+/, '').replace('#', '#').replace('#', '#').replace(']', ']').replace('[', '[').trim()); | ||
exports.getMarkdownHeaders = (lines, maxHeaderLevel) => { | ||
@@ -47,0 +47,0 @@ const extractText = (header) => { |
{ | ||
"name": "@technote-space/doctoc", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "Generates TOC for markdown files of local git repo.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
24965
0.03%