aboutsummaryrefslogtreecommitdiffhomepage
path: root/publisher
diff options
context:
space:
mode:
authorPavlo Matiash <[email protected]>2021-02-01 10:32:39 +0200
committerGitHub <[email protected]>2021-02-01 09:32:39 +0100
commitb2a48dce58abd3a661aa198af3277ef12f44cce0 (patch)
tree68f114deb3fa2333b32228c86fffa5beddf3722c /publisher
parent35def0ae4560bb86febd12663bf5602485ad4b20 (diff)
downloadhugo-b2a48dce58abd3a661aa198af3277ef12f44cce0.tar.gz
hugo-b2a48dce58abd3a661aa198af3277ef12f44cce0.zip
Trim whitespace in elements written to hugo_stats.json
Fixes #7958
Diffstat (limited to 'publisher')
-rw-r--r--publisher/htmlElementsCollector.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/publisher/htmlElementsCollector.go b/publisher/htmlElementsCollector.go
index ace5a78b4..1823a8327 100644
--- a/publisher/htmlElementsCollector.go
+++ b/publisher/htmlElementsCollector.go
@@ -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)
}