Skip to content

Commit

Permalink
🎨 Protyle 脚注定义元素语法问题兼容 siyuan-note/siyuan#5503
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jul 24, 2022
1 parent f3b7c70 commit 182a0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion render/protyle_preview_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ func (r *ProtylePreviewRenderer) renderFootnotesDef(node *ast.Node, entering boo
// r.WriteString("<li id=\"footnotes-def-" + node.FootnotesRefId + "\">")
// 在 li 上带 id 后,Pandoc HTML 转换 Docx 会有问题
r.WriteString("<li>")
if 0 < len(node.FootnotesRefs) {
if 0 < len(node.FootnotesRefs) && nil != node.FirstChild {
refId := node.FootnotesRefs[0].FootnotesRefId
node.FirstChild.PrependChild(&ast.Node{Type: ast.NodeInlineHTML, Tokens: []byte("<span id=\"footnotes-def-" + refId + "\"></span>")})
}
Expand Down

0 comments on commit 182a0f6

Please sign in to comment.