mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-16 21:55:29 +01:00
🎨 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:
parent
cdf60c1105
commit
ca24bea936
5 changed files with 51 additions and 40 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue