mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 02:36:10 +01:00
🎨 Clean code
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
f6e9ed5b55
commit
d5f7bf2c02
2 changed files with 5 additions and 1 deletions
|
|
@ -27,6 +27,10 @@ import (
|
|||
"github.com/siyuan-note/logging"
|
||||
)
|
||||
|
||||
func ReplaceNewline(text, replaceWith string) string {
|
||||
return regexp.MustCompile(`[\r\n]+`).ReplaceAllString(text, replaceWith)
|
||||
}
|
||||
|
||||
func ContainsCJK(text string) bool {
|
||||
for _, r := range text {
|
||||
ret := unicode.Is(unicode.Han, r) || unicode.Is(unicode.Lm, r) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue