mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-26 18:26:09 +01:00
🎨 Clean code
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
e9564ff0ec
commit
ffd947233e
1 changed files with 3 additions and 1 deletions
|
|
@ -27,8 +27,10 @@ import (
|
|||
"github.com/siyuan-note/logging"
|
||||
)
|
||||
|
||||
var newlinesRegex = regexp.MustCompile(`[\r\n]+`)
|
||||
|
||||
func ReplaceNewline(text, replaceWith string) string {
|
||||
return regexp.MustCompile(`[\r\n]+`).ReplaceAllString(text, replaceWith)
|
||||
return newlinesRegex.ReplaceAllString(text, replaceWith)
|
||||
}
|
||||
|
||||
func ContainsCJK(text string) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue