b = r(`
[build.buildStats]
+enable = true
+disabletags = true
+disableclasses = true
+ `)
+
+ b.AssertFileContent("hugo_stats.json", "! myclass", "! div", "myid")
+
+ b = r(`
+[build.buildStats]
enable = false
`)
b.AssertDestinationExists("hugo_stats.json", false)
func (w *htmlElementsCollectorWriter) parseHTMLElement(elStr string) (el htmlElement, err error) {
conf := w.collector.conf
- if conf.DisableTags && conf.DisableClasses {
- // Nothing to do.
- return
- }
-
tagName := parseStartTag(elStr)
el.Tag = strings.ToLower(tagName)