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