🎨 Improve handling of assets when exporting to Word .docx format https://github.com/siyuan-note/siyuan/issues/15253

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-09 19:11:41 +08:00
parent cdf60c1105
commit ca24bea936
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 51 additions and 40 deletions

View file

@ -631,7 +631,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (
// assetsLinkDestsInTree
if !util.IsAssetLinkDest(destNode.Tokens) {
if !util.IsAssetLinkDest(destNode.Tokens, false) {
return
}
@ -686,7 +686,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (
if n.IsTextMarkType("a") {
dest := n.TextMarkAHref
if util.IsAssetLinkDest([]byte(dest)) {
if util.IsAssetLinkDest([]byte(dest), false) {
var title string
if titleNode := n.ChildByType(ast.NodeLinkTitle); nil != titleNode {
title = gulu.Str.FromBytes(titleNode.Tokens)
@ -776,7 +776,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (
return
}
if !util.IsAssetLinkDest(src) {
if !util.IsAssetLinkDest(src, false) {
walkStatus = ast.WalkContinue
return
}