mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🐛 Assets search garbled characters Fix https://github.com/siyuan-note/siyuan/issues/8828
This commit is contained in:
parent
d8614cd594
commit
bcf0a9341b
1 changed files with 3 additions and 1 deletions
|
|
@ -68,8 +68,10 @@ func RemoveID(name string) string {
|
||||||
ext := path.Ext(name)
|
ext := path.Ext(name)
|
||||||
name = strings.TrimSuffix(name, ext)
|
name = strings.TrimSuffix(name, ext)
|
||||||
if 23 < len(name) {
|
if 23 < len(name) {
|
||||||
|
if id := name[len(name)-22:]; ast.IsNodeIDPattern(id) {
|
||||||
name = name[:len(name)-23]
|
name = name[:len(name)-23]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return name + ext
|
return name + ext
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue