mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-28 17:22:38 +00:00
Avoid converting summary to []byte and back to string
This commit is contained in:
+1
-1
@@ -191,7 +191,7 @@ func (p *Page) setSummary() {
|
||||
// If hugo defines split:
|
||||
// render, strip html, then split
|
||||
summary, truncated := helpers.TruncateWordsToWholeSentence(p.PlainWords(), helpers.SummaryLength)
|
||||
p.Summary = helpers.BytesToHTML([]byte(summary))
|
||||
p.Summary = template.HTML(summary)
|
||||
p.Truncated = truncated
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user