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