From 3223b6b5f502dbfc196f338f545de5f5982e69fd Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 8 Dec 2024 18:34:55 +0800 Subject: [PATCH] :art: Improve exporting block ref https://github.com/siyuan-note/siyuan/issues/13331 --- render/protyle_export_renderer.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/render/protyle_export_renderer.go b/render/protyle_export_renderer.go index 7537b07e0..0a5a07a1f 100644 --- a/render/protyle_export_renderer.go +++ b/render/protyle_export_renderer.go @@ -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}) @@ -216,6 +221,10 @@ func (r *ProtyleExportRenderer) renderTextMark(node *ast.Node, entering bool) as r.Tag("a", attrs, false) r.WriteString(textContent) r.WriteString("") + + if sup { + r.Tag("/sup", nil, false) + } } else if node.IsTextMarkType("inline-memo") { r.WriteString(textContent)