aredridel/html5 — pull request #53 by gwicke (2012-04-16 14:39:14+00:00)
Title: Preserve original attribute order in normalize_token

The order of attributes was reversed in normalize_token, and not restored to the original order. This patch swaps the final push to unshift, so that the order is restored. Round-tripping valid HTML should now produce (close to) identical HTML, which is important in applications where the HTML output is compared.

The number of passing tests is unchanged by this patch at 2227/2675.