浏览代码

:art: Improve export to Liandi https://github.com/siyuan-note/siyuan/issues/12338

Daniel 10 月之前
父节点
当前提交
283ca7da41
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      kernel/model/export.go

+ 5 - 0
kernel/model/export.go

@@ -1866,6 +1866,11 @@ func exportMarkdownContent0(tree *parse.Tree, cloudAssetsBase string, assetsDest
 				if util.IsAssetLinkDest([]byte(href)) {
 					n.TextMarkAHref = strings.ReplaceAll(href, " ", "_")
 				}
+			} else if ast.NodeIFrame == n.Type || ast.NodeAudio == n.Type || ast.NodeVideo == n.Type {
+				dest := treenode.GetNodeSrcTokens(n)
+				if util.IsAssetLinkDest([]byte(dest)) {
+					setAssetsLinkDest(n, dest, strings.ReplaceAll(dest, " ", "_"))
+				}
 			}
 			return ast.WalkContinue
 		})