mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-29 07:56:58 +00:00
Avoid converting summary to []byte and back to string
This commit is contained in:
parent
371c148c34
commit
22d85c2a18
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue