🎨 Database primary key anchor text supports line breaks https://github.com/siyuan-note/siyuan/issues/13624

This commit is contained in:
Daniel 2025-01-02 11:10:16 +08:00
parent 6125603e38
commit 07cd4ec0b5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 23 additions and 13 deletions

View file

@ -20,6 +20,7 @@ import (
"os"
"path/filepath"
"regexp"
"strings"
"unicode"
"github.com/88250/gulu"
@ -69,6 +70,13 @@ func RemoveInvalid(text string) (ret string) {
return
}
func RemoveInvalidRetainCtrl(text string) (ret string) {
ret = strings.ReplaceAll(text, "\u00A0", " ") // NBSP 转换为普通空格
ret = gulu.Str.RemoveZeroWidthCharacters(ret)
ret = gulu.Str.RemovePUA(ret)
return
}
var NativeEmojiChars = map[string]bool{}
func InitEmojiChars() {