Skip to content

Commit

Permalink
🎨 Improve exporting block ref siyuan-note/siyuan#13331
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Dec 8, 2024
1 parent 408cb4f commit 3223b6b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions render/protyle_export_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ func (r *ProtyleExportRenderer) renderTextMark(node *ast.Node, entering bool) as
}

if node.IsTextMarkType("a") {
sup := node.ContainTextMarkTypes("sup")
if sup {
r.Tag("sup", nil, false)
}

attrs := [][]string{{"href", node.TextMarkAHref}}
if "" != node.TextMarkATitle {
attrs = append(attrs, []string{"title", node.TextMarkATitle})
Expand All @@ -216,6 +221,10 @@ func (r *ProtyleExportRenderer) renderTextMark(node *ast.Node, entering bool) as
r.Tag("a", attrs, false)
r.WriteString(textContent)
r.WriteString("</a>")

if sup {
r.Tag("/sup", nil, false)
}
} else if node.IsTextMarkType("inline-memo") {
r.WriteString(textContent)

Expand Down

0 comments on commit 3223b6b

Please sign in to comment.