Skip to content

Commit

Permalink
🎨 Protyle Improve exporting block ref siyuan-note/siyuan#13283
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Dec 2, 2024
1 parent 83b4fa1 commit 2ccb528
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions render/protyle_export_docx_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1377,20 +1377,8 @@ func (r *ProtyleExportDocxRenderer) renderHeading(node *ast.Node, entering bool)
r.Newline()
level := headingLevel[node.HeadingLevel : node.HeadingLevel+1]
r.WriteString("<h" + level)
id := HeadingID(node)
if r.Options.ToC || r.Options.HeadingID || r.Options.KramdownBlockIAL {
r.WriteString(" id=\"" + id + "\"")
if r.Options.KramdownBlockIAL {
if "id" != r.Options.KramdownIALIDRenderName && 0 < len(node.KramdownIAL) {
r.WriteString(" " + r.Options.KramdownIALIDRenderName + "=\"" + node.KramdownIAL[0][1] + "\"")
}
if 1 < len(node.KramdownIAL) {
exceptID := node.KramdownIAL[1:]
for _, attr := range exceptID {
r.WriteString(" " + attr[0] + "=\"" + attr[1] + "\"")
}
}
}
for _, attr := range node.KramdownIAL {
r.WriteString(" " + attr[0] + "=\"" + attr[1] + "\"")
}
r.WriteString(">")
} else {
Expand Down

0 comments on commit 2ccb528

Please sign in to comment.