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