mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 PDF files with too long file names cannot generate annotated images https://github.com/siyuan-note/siyuan/issues/15739 https://github.com/siyuan-note/siyuan/issues/10666
This commit is contained in:
parent
1e95b68df6
commit
cfb976eb89
7 changed files with 34 additions and 15 deletions
|
|
@ -172,12 +172,12 @@ func Ext(name string) (ret string) {
|
|||
return
|
||||
}
|
||||
|
||||
func AssetName(name string) string {
|
||||
func AssetName(name, newID string) string {
|
||||
_, id := LastID(name)
|
||||
ext := Ext(name)
|
||||
name = name[0 : len(name)-len(ext)]
|
||||
if !ast.IsNodeIDPattern(id) {
|
||||
id = ast.NewNodeID()
|
||||
id = newID
|
||||
name = name + "-" + id + ext
|
||||
} else {
|
||||
if !ast.IsNodeIDPattern(name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue