mozilla/kuma — pull request #585 by lmorchard (2012-09-11 22:38:09+00:00)
Title: fix bug 775952: Skip reconstruction of active formatting elements in HTML5 serializations

After all the wrangling I tried and threw out, a 1-line fix seems too easy. But, it seems to work.

To spot check, try this in a document before switching to this branch:

Foo

Lorem ipsum

Dolor amet

Bar

Bacon bacon bacon

Baz

Tofu tofu tofu

Quux

Peas peas peas

The above should result in a mess of anchors strewn everywhere, between header blocks:

Foo

Lorem ipsum

Dolor amet

Bar

Bacon bacon bacon

Baz

Tofu tofu tofu

Quux

Peas peas peas

Once the fix is applied, this should neaten up like so:

Foo

Lorem ipsum

Dolor amet

Bar

Bacon bacon bacon

Baz

Tofu tofu tofu

Quux

Peas peas peas