This commit is contained in:
deepzz0
2016-10-04 21:43:56 +08:00
parent f3625ae63a
commit e3d722d270
3 changed files with 13 additions and 2 deletions

2
db.go
View File

@@ -355,7 +355,7 @@ var reg = regexp.MustCompile(setting.Conf.Identifier)
func GenerateExcerptAndRender(artc *Article) {
index := reg.FindStringIndex(artc.Content)
if len(index) > 0 {
artc.Excerpt = artc.Content[0:index[0]]
artc.Excerpt = IgnoreHtmlTag(artc.Content[0:index[0]])
} else {
uc := []rune(artc.Content)
length := setting.Conf.Length