From 7c4fdc9084b5a54c7e44ead69319d9d6f2ad5120 Mon Sep 17 00:00:00 2001 From: xing Date: Sat, 24 Sep 2022 21:48:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/Excerpt.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 } }