mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 网络图片转换为本地图片 支持处理 file:// 本地路径图片 Fix https://github.com/siyuan-note/siyuan/issues/6546
This commit is contained in:
@@ -582,7 +582,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (
|
||||
|
||||
// assetsLinkDestsInTree
|
||||
|
||||
if !IsAssetLinkDest(destNode.Tokens) {
|
||||
if !util.IsAssetLinkDest(destNode.Tokens) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -690,7 +690,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (
|
||||
return
|
||||
}
|
||||
|
||||
if !IsAssetLinkDest(src) {
|
||||
if !util.IsAssetLinkDest(src) {
|
||||
walkStatus = ast.WalkContinue
|
||||
return
|
||||
}
|
||||
@@ -1247,10 +1247,6 @@ func ialAttr(ial, name string) (ret string) {
|
||||
return
|
||||
}
|
||||
|
||||
func IsAssetLinkDest(dest []byte) bool {
|
||||
return bytes.HasPrefix(dest, []byte("assets/"))
|
||||
}
|
||||
|
||||
func removeDatabaseFile() (err error) {
|
||||
err = os.RemoveAll(util.DBPath)
|
||||
if nil != err {
|
||||
|
||||
Reference in New Issue
Block a user