Trim whitespace in elements written to hugo_stats.json

Fixes #7958
This commit is contained in:
Pavlo Matiash 2021-02-01 10:32:39 +02:00 committed by GitHub
parent 35def0ae45
commit b2a48dce58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -149,6 +149,7 @@ func (c *cssClassCollectorWriter) insertStandinHTMLElement(el string) (string, s
if spacei != -1 {
tag = tag[:spacei]
}
tag = strings.Trim(tag, "\n ")
newv := strings.Replace(el, tag, "div", 1)
return newv, strings.ToLower(tag)
}