🎨 Improve error tip when renaming tags/bookmarks containing Markdown markers Fix https://github.com/siyuan-note/siyuan/issues/9248

This commit is contained in:
Daniel 2023-09-28 10:59:50 +08:00
parent 20cd3c5f80
commit 4283f73407
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
8 changed files with 13 additions and 13 deletions

View file

@ -105,8 +105,8 @@ func RemoveTag(label string) (err error) {
}
func RenameTag(oldLabel, newLabel string) (err error) {
if treenode.ContainsMarker(newLabel) {
return errors.New(Conf.Language(112))
if invalidChar := treenode.ContainsMarker(newLabel); "" != invalidChar {
return errors.New(fmt.Sprintf(Conf.Language(112), invalidChar))
}
newLabel = strings.TrimSpace(newLabel)