diff options
author | Pavlo Matiash <paul.matyash@gmail.com> | 2021-02-01 10:32:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 09:32:39 +0100 |
commit | b2a48dce58abd3a661aa198af3277ef12f44cce0 (patch) | |
tree | 68f114deb3fa2333b32228c86fffa5beddf3722c /publisher/htmlElementsCollector.go | |
parent | 35def0ae4560bb86febd12663bf5602485ad4b20 (diff) |
Trim whitespace in elements written to hugo_stats.json
Fixes #7958
Diffstat (limited to 'publisher/htmlElementsCollector.go')
-rw-r--r-- | publisher/htmlElementsCollector.go | 1 |
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) } |