Cleanup nbsp-only text nodes.
Wrap LI contents when merging.