fix unuse tag <!--more-->

intercept errors
This commit is contained in:
deepzz0
2017-07-15 13:46:29 +08:00
parent f150974566
commit 27162d2205
2 changed files with 6 additions and 6 deletions

View File

@@ -70,12 +70,12 @@ func ReadDir(dir string, filter func(name string) bool) (files []string) {
}
func IgnoreHtmlTag(src string) string {
//去除所有尖括号内的HTML代码
re, _ := regexp.Compile("\\<[\\S\\s]+?\\>")
// 去除所有尖括号内的HTML代码
re, _ := regexp.Compile(`<[\S\s]+?>`)
src = re.ReplaceAllString(src, "")
//去除换行符
re, _ = regexp.Compile("\\s{2,}")
// 去除换行符
re, _ = regexp.Compile(`\s+`)
return re.ReplaceAllString(src, "")
}