Skip to content

Commit

Permalink
publisher: Exclude comment and doctype elements from writeStats
Browse files Browse the repository at this point in the history
- Reorder code blocks
- Rename cssClassCollectorWriter to htmlElementCollectorWriter, as it just collect html element information
- Expand benchmark to test for minified and unminified content

Fixes gohugoio#8396, Fixes gohugoio#8417
  • Loading branch information
dirkolbrich committed Apr 20, 2021
1 parent 3ddffd0 commit cd8970e
Show file tree
Hide file tree
Showing 3 changed files with 292 additions and 155 deletions.
2 changes: 1 addition & 1 deletion hugolib/site_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ ABC.
els := stats.HTMLElements

b.Assert(els.Classes, qt.HasLen, 3606) // (4 * 900) + 4 +2
b.Assert(els.Tags, qt.HasLen, 9)
b.Assert(els.Tags, qt.HasLen, 8)
b.Assert(els.IDs, qt.HasLen, 1)
}
}
Loading

0 comments on commit cd8970e

Please sign in to comment.