mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
🎨 Limit the database title to 256 characters https://github.com/siyuan-note/siyuan/issues/15459
This commit is contained in:
parent
3d9b0bfa6f
commit
0d3a2479cb
2 changed files with 13 additions and 0 deletions
|
|
@ -2922,6 +2922,10 @@ func (tx *Transaction) setAttributeViewName(operation *Operation) (err error) {
|
|||
}
|
||||
|
||||
attrView.Name = strings.TrimSpace(operation.Data.(string))
|
||||
attrView.Name = strings.ReplaceAll(attrView.Name, "\n", " ")
|
||||
if 256 < len(attrView.Name) {
|
||||
attrView.Name = gulu.Str.SubStr(attrView.Name, 256)
|
||||
}
|
||||
err = av.SaveAttributeView(attrView)
|
||||
|
||||
_, nodes := tx.getAttrViewBoundNodes(attrView)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue