Added test for merging consecutive <i> tags
Reorded code slightly