Fix class collector when running with --minify

Also add a related stresstest.

Fixes #7161
This commit is contained in:
Bjørn Erik Pedersen
2020-04-21 12:57:45 +02:00
parent 27af5a339a
commit f37e77f2d3
3 changed files with 116 additions and 15 deletions

View File

@@ -87,11 +87,6 @@ func (w *cssClassCollectorWriter) Write(p []byte) (n int, err error) {
if w.isCollecting {
for ; i < len(p); i++ {
b := p[i]
if !w.inQuote && b == '/' {
// End element, we don't care about those.
w.endCollecting(true)
break
}
w.toggleIfQuote(b)
if !w.inQuote && b == '>' {
w.endCollecting(false)