Skip to content

Commit

Permalink
Bugfix: attr index buffer still used old indices
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed May 14, 2015
1 parent 1349c89 commit 4e4d04b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions html/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ func Minify(m minify.Minifier, _ string, w io.Writer, r io.Reader) error {
func getAttributes(tb *html.TokenBuffer, attrIndexBuffer *[]int, attrTokenBuffer *[]*html.Token, hashes ...html.Hash) []*html.Token {
*attrIndexBuffer = (*attrIndexBuffer)[:len(hashes)]
*attrTokenBuffer = (*attrTokenBuffer)[:len(hashes)]
for j, _ := range *attrIndexBuffer {
(*attrIndexBuffer)[j] = 0
}
i := 0
for {
t := tb.Peek(i)
Expand Down

0 comments on commit 4e4d04b

Please sign in to comment.