mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-14 11:14:21 +01:00
🐛 清理未引用资源时未忽略 custom-data-assets 属性定义的资源文件 Fix https://github.com/siyuan-note/siyuan/issues/4122
This commit is contained in:
parent
14f8ba10a9
commit
02b0c553e3
2 changed files with 6 additions and 2 deletions
|
|
@ -550,7 +550,11 @@ func assetsLinkDestsInTree(tree *parse.Tree) (ret []string) {
|
|||
ret = append(ret, dest)
|
||||
} else {
|
||||
if ast.NodeWidget == n.Type {
|
||||
dataAssets := n.IALAttr("data-assets")
|
||||
dataAssets := n.IALAttr("custom-data-assets")
|
||||
if "" == dataAssets {
|
||||
// 兼容两种属性名 custom-data-assets 和 data-assets https://github.com/siyuan-note/siyuan/issues/4122#issuecomment-1154796568
|
||||
dataAssets = n.IALAttr("data-assets")
|
||||
}
|
||||
if "" == dataAssets || !isRelativePath([]byte(dataAssets)) {
|
||||
return ast.WalkContinue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue