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"; $output .= "<pre>\n$text\n</pre>\n";
break; break;
case ">": case ">":
$text = implode("\n", $node["texts"]); $output .= "<blockquote>\n";
self::htmlPrepare($text); foreach ($node["texts"] as $text) {
if ($textDecoration) self::addTextDecoration($text); self::htmlPrepare($text);
$output .= "<blockquote>\n$text\n</blockquote>\n"; if ($textDecoration) self::addTextDecoration($text);
$output .= "<p>$text</p>\n";
}
$output .= "</blockquote>\n";
break; break;
case "=>": case "=>":
$link = $node["link"]; $link = $node["link"];

View File

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