remove empty
This commit is contained in:
+1
-3
@@ -41,7 +41,5 @@ func check() {
|
||||
}
|
||||
|
||||
func removeEmpty(s string) string {
|
||||
regex, _ := regexp.Compile("\n\n")
|
||||
s = regex.ReplaceAllString(s, "\n")
|
||||
return s
|
||||
return regexp.MustCompile(`[\t\r\n]+`).ReplaceAllString(strings.TrimSpace(s), "\n")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user