Fix additional margins around paragraphs for rich-text-nodes in XHMTL.

This solves issue #1979.