FIX: each blockquote lines are in <p>

This commit is contained in:
Christophe HENRY 2021-03-25 12:22:39 +01:00
parent c37549d50c
commit 91abafdce0
2 changed files with 16 additions and 13 deletions

View File

@ -283,10 +283,13 @@ class GemtextTranslate_html {
$output .= "<pre>\n$text\n</pre>\n";
break;
case ">":
$text = implode("\n", $node["texts"]);
self::htmlPrepare($text);
if ($textDecoration) self::addTextDecoration($text);
$output .= "<blockquote>\n$text\n</blockquote>\n";
$output .= "<blockquote>\n";
foreach ($node["texts"] as $text) {
self::htmlPrepare($text);
if ($textDecoration) self::addTextDecoration($text);
$output .= "<p>$text</p>\n";
}
$output .= "</blockquote>\n";
break;
case "=>":
$link = $node["link"];

View File

@ -1,27 +1,27 @@
<p>This text is made of empty quotes&#8239;:</p>
<blockquote>
&nbsp;
<p>&nbsp;</p>
</blockquote>
<p>&nbsp;</p>
<p>Quotes with one word:</p>
<blockquote>
one
<p>one</p>
</blockquote>
<p>Quotes with two words:</p>
<blockquote>
A B
<p>A B</p>
</blockquote>
<p>&nbsp;</p>
<p>Several quotes&#8239;:</p>
<blockquote>
1
2
3
<p>1</p>
<p>2</p>
<p>3</p>
</blockquote>
<p>&nbsp;</p>
<p>Quotes with an empty one in between:</p>
<blockquote>
1
3
<p>1</p>
<p>&nbsp;</p>
<p>3</p>
</blockquote>