fix: toc
This commit is contained in:
@@ -30,7 +30,7 @@ export function extractHeadings(content: string): TocNode[] {
|
|||||||
const slugger = new Slugger();
|
const slugger = new Slugger();
|
||||||
|
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
const match = line.match(/^(#{1,6})\s+(.+)$/);
|
const match = line.trim().match(/^(#{1,6})\s+(.+)$/);
|
||||||
if (!match) continue;
|
if (!match) continue;
|
||||||
|
|
||||||
const level = match[1].length;
|
const level = match[1].length;
|
||||||
|
|||||||
Reference in New Issue
Block a user