🎨 限制笔记本名和文档名最大长度为 512 https://github.com/siyuan-note/siyuan/issues/6299

This commit is contained in:
Liang Ding 2022-10-22 17:09:59 +08:00
parent 6d2ff690b2
commit 569cd2814a
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 15 additions and 8 deletions

View file

@ -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))
}