diff --git a/plugins/Excerpt.go b/plugins/Excerpt.go index 0a34175..cba6352 100644 --- a/plugins/Excerpt.go +++ b/plugins/Excerpt.go @@ -47,11 +47,11 @@ func ExceptRaw(str string, limit, id int) string { } else { content = string(ru[:end]) closeTag := CloseHtmlTag(content) + tmp := `%s......%s
` if strings.Contains(closeTag, "pre") || strings.Contains(closeTag, "code") { - content = fmt.Sprintf(`%s%s......`, content, closeTag, id) - } else { - content = fmt.Sprintf(`%s......%s`, content, closeTag, id) + tmp = `%s%s......` } + content = fmt.Sprintf(tmp, content, closeTag, id) break } }