FIX adds alt property to preformated text in HTML

This commit is contained in:
Christophe HENRY 2021-04-05 11:36:14 +02:00
parent 8cf174ecb3
commit a9fb49802a
5 changed files with 12 additions and 11 deletions

View File

@ -314,7 +314,8 @@ class GemtextTranslate_html {
case "```":
$text = implode("\n", $node["texts"]);
self::htmlPrepare($text);
$output .= "<pre>\n$text\n</pre>\n";
$alt = $node["alt"];
$output .= "<pre alt='$alt'>\n$text\n</pre>\n";
break;
case ">":
$output .= "<blockquote>\n";

View File

@ -1,13 +1,13 @@
<pre>
<pre alt='Text to not display but keep in memory'>
Bellow here, an empty line
</pre>
<p>&nbsp;</p>
<pre>
<pre alt='X'>
&nbsp;
</pre>
<p>&nbsp;</p>
<pre>
<pre alt=''>
No
alt
text

View File

@ -1,13 +1,13 @@
<pre>
<pre alt='Text to not display but keep in memory'>
Bellow here, an empty line
</pre>
<p>&nbsp;</p>
<pre>
<pre alt='X'>
&nbsp;
</pre>
<p>&nbsp;</p>
<pre>
<pre alt=''>
No
alt
text

View File

@ -223,7 +223,7 @@
<p>&nbsp;</p>
<p>Lines beginning with the two characters &quot;=&gt;&quot; are link lines, which have the following syntax:</p>
<p>&nbsp;</p>
<pre>
<pre alt=''>
=&gt;[&lt;whitespace&gt;]&lt;URL&gt;[&lt;whitespace&gt;&lt;USER-FRIENDLY LINK NAME&gt;]
</pre>
<p>&nbsp;</p>
@ -237,7 +237,7 @@
<p>&nbsp;</p>
<p>All the following examples are valid link lines:</p>
<p>&nbsp;</p>
<pre>
<pre alt=''>
=&gt; gemini://example.org/
=&gt; gemini://example.org/ An example link
=&gt; gemini://example.org/foo Another example link at the same host

View File

@ -223,7 +223,7 @@
<p>&nbsp;</p>
<p>Lines beginning with the two characters &quot;=&gt;&quot; are link lines, which have the following syntax:</p>
<p>&nbsp;</p>
<pre>
<pre alt=''>
=&gt;[&lt;whitespace&gt;]&lt;URL&gt;[&lt;whitespace&gt;&lt;USER-FRIENDLY LINK NAME&gt;]
</pre>
<p>&nbsp;</p>
@ -237,7 +237,7 @@
<p>&nbsp;</p>
<p>All the following examples are valid link lines:</p>
<p>&nbsp;</p>
<pre>
<pre alt=''>
=&gt; gemini://example.org/
=&gt; gemini://example.org/ An example link
=&gt; gemini://example.org/foo Another example link at the same host