when merging paragraphs, only add the contents of the second to the first if the second is a containr element