Fix garbled HTML paragraph syntax during markdown conversion
Fix garbled HTML paragraph syntax during markdown conversion

Fixes vector-im/riot-ios#1500.

It turns out that stripping the leading and ending `<p>`
tags was done in a simplistic way, which ignored the fact
that the string may contain multiple paragraphs.

For example, stripping the leading and ending `<p>` from:

	<p>line 1</p>
	<p>line 2</p>

(incorrectly) used to produce:

	line 1</p>
	<p>line 2

With this patch, we only do leading/ending `<p>` stripping
if the HTML string contains exactly 1 paragraph.

Signed-off-by: Slavi Pantaleev <018f1c5d0b0446d0b5f0fcc3b1fe8269e0d0200a@gmail.com>

matrix-org/matrix-ios-kit,matrix-org/matrix-ios-kit,matrix-org/matrix-ios-kit,matrix-org/matrix-ios-kit