fix: 标题中包含链接时解析错误

This commit is contained in:
xiaozzzi 2024-03-13 15:40:28 +08:00
parent 17c05ee47e
commit f45bfd03a1

View File

@ -104,15 +104,14 @@ export const renderHeading = (text: string, level: number, raw: string) => {
if (dom) {
id += dom.body.innerText
} else {
id += text
id += raw
}
} else {
id += text
id += raw
}
} catch {
id += text
id += raw
}
return `<h${level} id="${id}">${text}</h${level}>`
}