mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 14:39:21 +08:00
fix: 标题中包含链接时解析错误
This commit is contained in:
parent
17c05ee47e
commit
f45bfd03a1
@ -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}>`
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user