🎨 /模板
搜索按名称自然升序排序 Fix https://github.com/siyuan-note/siyuan/issues/5916
This commit is contained in:
parent
a306fb4845
commit
7eafbf0171
1 changed files with 2 additions and 0 deletions
|
@ -23,6 +23,7 @@ import (
|
|||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"text/template"
|
||||
"time"
|
||||
|
@ -88,6 +89,7 @@ func SearchTemplate(keyword string) (ret []*Block) {
|
|||
}
|
||||
return nil
|
||||
})
|
||||
sort.Slice(ret, func(i, j int) bool { return util.PinYinCompare(filepath.Base(ret[i].Path), filepath.Base(ret[j].Path)) })
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue