hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit b2a48dce58abd3a661aa198af3277ef12f44cce0
parent 35def0ae4560bb86febd12663bf5602485ad4b20
Author: Pavlo Matiash <paul.matyash@gmail.com>
Date:   Mon,  1 Feb 2021 10:32:39 +0200

Trim whitespace in elements written to hugo_stats.json

Fixes #7958 
Diffstat:
Mpublisher/htmlElementsCollector.go | 1+
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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)
 }