Closed laurenkt closed 5 months ago
Addresses issue #50
If comments were adjacent in a document with no whitespace between them, then for each pair of comments the second comment would be skipped due to the underlying slice being modified as it was being ranged over.
For example, the following document:
<a><!-- comment1 --><!-- comment2 --><!-- comment 3 --></a>
Would be incorrectly canonicalized to:
<a><!-- comment2 --></a>
This patch fixes that issue and adds a new test case to cover it.
Addresses issue #50
If comments were adjacent in a document with no whitespace between them, then for each pair of comments the second comment would be skipped due to the underlying slice being modified as it was being ranged over.
For example, the following document:
Would be incorrectly canonicalized to:
This patch fixes that issue and adds a new test case to cover it.