[tex4ht-commits] [SCM] tex4ht updated: r1647 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Thu Feb 20 12:12:32 CET 2025


Author: michal_h21
Date: 2025-02-20 11:12:32 +0000 (Thu, 20 Feb 2025)
New Revision: 1647

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-html4.tex
Log:
remove  spurious end paragraphs from listings

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2025-02-19 14:56:35 UTC (rev 1646)
+++ trunk/lit/ChangeLog	2025-02-20 11:12:32 UTC (rev 1647)
@@ -1,3 +1,9 @@
+2025-02-20  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-html4.tex (html4.4ht): remove spurious </p> tags from
+	Listings.
+	https://puszcza.gnu.org.ua/bugs/?648
+
 2025-02-19  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-ooffice.tex (ooffice.4ht): make \OOstyle declarations

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2025-02-19 14:56:35 UTC (rev 1646)
+++ trunk/lit/tex4ht-html4.tex	2025-02-20 11:12:32 UTC (rev 1647)
@@ -15506,13 +15506,13 @@
 \Configure{listings}
    {\ifvmode \IgnorePar\fi \EndP%
     {\everypar{}\leavevmode}\HCode{<!--l. \the\inputlineno-->}%
-     \ifnum \listings:Depth=0 \HCode{<pre class="listings" id="listing-\listingN">}\else%
+     \ifnum \listings:Depth=0 \HtmlParOff\HCode{<pre class="listings" id="listing-\listingN">}\else%
                               \HCode{<span class="listings-nested" id="listing-\listingN">}\fi%
      \gHAdvance\listings:Depth by 1%
      \gdef\start:LstLn{}%
    }
    {\gHAdvance\listings:Depth by -1
-    \ifnum \listings:Depth=0 \HCode{</pre>}\else
+    \ifnum \listings:Depth=0 \HCode{</pre>}\HtmlParON\else
                              \HCode{</span>}\fi
    }
    {\start:LstLn\HCode{<span class="label">}%
@@ -15551,7 +15551,7 @@
 
 \<configure html4 listings\><<<
 \ConfigureEnv{lstlisting}
-   {\ifvmode \IgnorePar\fi \EndP  
+   {\ifvmode \IgnorePar\fi \EndP\HtmlParOff  
     \HCode{<!--l. \the\inputlineno-->}%
     \gdef\start:LstLn{%
        \HCode{<pre class="lstlisting" id="listing-\listingN">}%
@@ -15566,17 +15566,17 @@
          {\start:LstLn \HCode{<span class="label">}}
          {\HCode{</span>}}%
    }
-   {\egroup\par}
+   {\egroup\HtmlParOn\par}
    {} {}
 \Css{.lstlisting .label{margin-right:0.5em; }}
 \Css{pre.lstlisting{font-family: monospace,monospace; white-space: pre-wrap; 
-                    margin-top:0.5em; margin-bottom:0.5em;
+                    margin-top:0.5em; margin-bottom:0.5em; text-align: left;
                    }}
 >>>
 
 \<configure html4 listings\><<<
 \Configure{lstinputlisting}  
-   {\ifvmode \IgnorePar\fi \EndP  
+   {\ifvmode \IgnorePar\fi \EndP\HtmlParOff 
     \HCode{<!--l. \the\inputlineno-->}%  
     \gdef\start:LstLn{\HCode{<pre class="lstinputlisting" id="listing-\listingN">}\gdef\start:LstLn{\HCode{\Hnewline}}}% ignore first newline, to prevent spurious line
     \bgroup\ttfamily%\special{t4ht@(}%  
@@ -15588,10 +15588,11 @@
    }  
    {%\special{t4ht@)}
     \egroup%  
-    \ifvmode \IgnorePar\fi \EndP  \HCode{</pre>}\par}% 
+    \ifvmode \IgnorePar\fi \EndP  \HCode{</pre>}\HtmlParOn\par}% 
 \Css{pre.lstinputlisting{
    font-family: monospace,monospace;
    white-space: pre-wrap; 
+   text-align: left;
 }}
 \Css{.lstinputlisting .label{margin-right:0.5em;}}
 >>>



More information about the tex4ht-commits mailing list.