mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-26 17:04:07 +01:00
🎨 限制笔记本名和文档名最大长度为 512 https://github.com/siyuan-note/siyuan/issues/6299
This commit is contained in:
parent
6d2ff690b2
commit
569cd2814a
7 changed files with 15 additions and 8 deletions
|
|
@ -1270,7 +1270,7 @@ func RenameDoc(boxID, p, title string) (err error) {
|
|||
|
||||
title = gulu.Str.RemoveInvisible(title)
|
||||
if 512 < utf8.RuneCountInString(title) {
|
||||
// 限制文档名称最大长度为 `512` https://github.com/siyuan-note/siyuan/issues/6299
|
||||
// 限制笔记本名和文档名最大长度为 `512` https://github.com/siyuan-note/siyuan/issues/6299
|
||||
return errors.New(Conf.Language(106))
|
||||
}
|
||||
|
||||
|
|
@ -1391,9 +1391,8 @@ func CreateDailyNote(boxID string) (p string, existed bool, err error) {
|
|||
|
||||
func createDoc(boxID, p, title, dom string) (err error) {
|
||||
title = gulu.Str.RemoveInvisible(title)
|
||||
|
||||
if 512 < utf8.RuneCountInString(title) {
|
||||
// 限制文档名称最大长度为 `512` https://github.com/siyuan-note/siyuan/issues/6299
|
||||
// 限制笔记本名和文档名最大长度为 `512` https://github.com/siyuan-note/siyuan/issues/6299
|
||||
return errors.New(Conf.Language(106))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue