discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* In HTML output literal blocks should strip newline before closing pre
@ 2020-10-15 20:48 Aman Verma
  2020-10-16 17:46 ` Ingo Schwarze
  0 siblings, 1 reply; 5+ messages in thread
From: Aman Verma @ 2020-10-15 20:48 UTC (permalink / raw)
  To: discuss

The problem with `.Bd -literal` blocks in HTML output is that mandoc
doesn't output the
closing pre tag on the same line. If the element is indented, browsers
will display an
extra line since pre is telling them to preserve whitespace.

A good example of the issue is
<https://mandoc.bsd.lv/man/mdoc.7.html#NAME>. The extra
space is clearly visible. The source is

        <pre>.Nm name0 ,
    .Nm name1 ,
    .Nm name2
    .Nd a one line description
        </pre>

What I'm proposing is that it should look like

        <pre>.Nm name0 ,
    .Nm name1 ,
    .Nm name2
    .Nd a one line description</pre>

This is what most Markdown processors do to solve the issue.

Best regards,
Aman
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: In HTML output literal blocks should strip newline before closing pre
  2020-10-15 20:48 In HTML output literal blocks should strip newline before closing pre Aman Verma
@ 2020-10-16 17:46 ` Ingo Schwarze
  2020-10-25 20:45   ` Michael Stapelberg
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Schwarze @ 2020-10-16 17:46 UTC (permalink / raw)
  To: Aman Verma; +Cc: discuss

Hello Aman,

Aman Verma wrote on Thu, Oct 15, 2020 at 04:48:50PM -0400:

> The problem with `.Bd -literal` blocks in HTML output is that
> mandoc doesn't output the closing pre tag on the same line.
> If the element is indented, browsers will display an extra
> line since pre is telling them to preserve whitespace.
> 
> A good example of the issue is
> <https://mandoc.bsd.lv/man/mdoc.7.html#NAME>.
> The extra space is clearly visible. The source is
> 
>         <pre>.Nm name0 ,
>     .Nm name1 ,
>     .Nm name2
>     .Nd a one line description
>         </pre>
> 
> What I'm proposing is that it should look like
> 
>         <pre>.Nm name0 ,
>     .Nm name1 ,
>     .Nm name2
>     .Nd a one line description</pre>
> 
> This is what most Markdown processors do to solve the issue.

I think your analysis and proposed solution are both correct,
so i committed the following fix and installed the corrected
version in these locations:

  https://mandoc.bsd.lv/man/
  https://man.bsd.lv/mdoc.7
  https://man.openbsd.org/mdoc.7

Thank you for the bug report,
  Ingo


Log Message:
-----------
In HTML output, avoid printing a newline right after <pre>
and right before </pre> because that resulted in vertical
whitespace not requested by the manual page author.

Formatting bug reported by 
Aman Verma <amanraoverma plus vim at gmail dot com> on discuss@.

Modified Files:
--------------
    mandoc:
        html.c
        man_html.c
        mdoc_html.c
    mandoc/regress/man/HP:
        literal.out_html
    mandoc/regress/man/IP:
        literal.out_html
    mandoc/regress/man/RS:
        literal.out_html
    mandoc/regress/man/SY:
        literal.out_html
    mandoc/regress/man/TP:
        literal.out_html
    mandoc/regress/mdoc/Bd:
        nf.out_html
        paragraph.out_html
    mandoc/regress/mdoc/Rs:
        paragraph.out_html
    mandoc/regress/roff/sp:
        fill-man.out_html
    mandoc/regress/roff/string:
        dotT.out_html

Revision Data
-------------
Index: paragraph.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Rs/paragraph.out_html,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lregress/mdoc/Rs/paragraph.out_html -Lregress/mdoc/Rs/paragraph.out_html -u -p -r1.4 -r1.5
--- regress/mdoc/Rs/paragraph.out_html
+++ regress/mdoc/Rs/paragraph.out_html
@@ -13,4 +13,3 @@
 <p class="Pp">in a paragraph:</p>
 <p class="Pp"><cite class="Rs"><span class="RsA">another author</span>,
     <i class="RsB">another book</i>.</cite></p>
-<pre>
Index: mdoc_html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v
retrieving revision 1.340
retrieving revision 1.341
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.340 -r1.341
--- mdoc_html.c
+++ mdoc_html.c
@@ -349,12 +349,11 @@ print_mdoc_node(MDOC_ARGS)
 	if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT)
 		return;
 
-	if (n->flags & NODE_NOFILL) {
-		html_fillmode(h, ROFF_nf);
-		if (n->flags & NODE_LINE)
-			print_endline(h);
-	} else
+	if ((n->flags & NODE_NOFILL) == 0)
 		html_fillmode(h, ROFF_fi);
+	else if (html_fillmode(h, ROFF_nf) == ROFF_nf &&
+	    n->tok != ROFF_fi && n->flags & NODE_LINE)
+		print_endline(h);
 
 	child = 1;
 	n->flags &= ~NODE_ENDED;
Index: man_html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/man_html.c,v
retrieving revision 1.178
retrieving revision 1.179
diff -Lman_html.c -Lman_html.c -u -p -r1.178 -r1.179
--- man_html.c
+++ man_html.c
@@ -169,7 +169,12 @@ print_man_node(MAN_ARGS)
 	if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT)
 		return;
 
-	html_fillmode(h, n->flags & NODE_NOFILL ? ROFF_nf : ROFF_fi);
+	if ((n->flags & NODE_NOFILL) == 0)
+		html_fillmode(h, ROFF_fi);
+	else if (html_fillmode(h, ROFF_nf) == ROFF_nf &&
+	    n->tok != ROFF_fi && n->flags & NODE_LINE &&
+	    (n->prev == NULL || n->prev->tok != MAN_YS))
+		print_endline(h);
 
 	child = 1;
 	switch (n->type) {
@@ -253,13 +258,6 @@ print_man_node(MAN_ARGS)
 	}
 	if (t != NULL)
 		print_stagq(h, t);
-
-	if (n->flags & NODE_NOFILL && n->tok != MAN_YS &&
-	    (n->next != NULL && n->next->flags & NODE_LINE)) {
-		/* In .nf = <pre>, print even empty lines. */
-		h->col++;
-		print_endline(h);
-	}
 }
 
 static void
Index: html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/html.c,v
retrieving revision 1.270
retrieving revision 1.271
diff -Lhtml.c -Lhtml.c -u -p -r1.270 -r1.271
--- html.c
+++ html.c
@@ -81,7 +81,7 @@ static	const struct htmldata htmltags[TA
 	{"h1",		HTML_TOPHRASE | HTML_NLAROUND},
 	{"h2",		HTML_TOPHRASE | HTML_NLAROUND},
 	{"p",		HTML_TOPHRASE | HTML_NLAROUND | HTML_INDENT},
-	{"pre",		HTML_TOPHRASE | HTML_NLALL | HTML_NOINDENT},
+	{"pre",		HTML_TOPHRASE | HTML_NLAROUND | HTML_NOINDENT},
 	{"a",		HTML_INPHRASE | HTML_TOPHRASE},
 	{"b",		HTML_INPHRASE | HTML_TOPHRASE},
 	{"cite",	HTML_INPHRASE | HTML_TOPHRASE},
Index: literal.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/HP/literal.out_html,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/HP/literal.out_html -Lregress/man/HP/literal.out_html -u -p -r1.2 -r1.3
--- regress/man/HP/literal.out_html
+++ regress/man/HP/literal.out_html
@@ -1,18 +1,12 @@
 <p class="Pp HP">tag indented text</p>
 <p class="Pp">regular paragraph</p>
-<pre>
-literal
-text
-</pre>
-<pre>
-tag
+<pre>literal
+text</pre>
+<pre>tag
 literal
 hanged
-paragraph
-</pre>
-<pre>
-literal
-paragraph
-</pre>
+paragraph</pre>
+<pre>literal
+paragraph</pre>
 regular text
 <br/>
Index: literal.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/IP/literal.out_html,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lregress/man/IP/literal.out_html -Lregress/man/IP/literal.out_html -u -p -r1.6 -r1.7
--- regress/man/IP/literal.out_html
+++ regress/man/IP/literal.out_html
@@ -3,42 +3,32 @@
   <dd>indented regular text</dd>
 </dl>
 <p class="Pp">new regular paragraph</p>
-<pre>
-literal
-text
-</pre>
+<pre>literal
+text</pre>
 <dl class="Bl-tag">
   <dt id="tag~2"><a class="permalink" href="#tag~2">tag</a></dt>
   <dd>
-    <pre>
-indented
+    <pre>indented
 literal
-text
-    </pre>
+text</pre>
   </dd>
 </dl>
-<pre>
-new
+<pre>new
 literal
-paragraph
-</pre>
+paragraph</pre>
 regular text
 <section class="Ss">
 <h2 class="Ss" id="literal_into_indented_paragraph"><a class="permalink" href="#literal_into_indented_paragraph">literal
   into indented paragraph</a></h2>
 <p class="Pp">regular text</p>
-<pre>
-literal
-text
-</pre>
+<pre>literal
+text</pre>
 <dl class="Bl-tag">
   <dt id="tag~3"><a class="permalink" href="#tag~3">tag</a></dt>
   <dd>
-    <pre>
-indented
+    <pre>indented
 literal
-text
-    </pre>
+text</pre>
     indented regular text</dd>
 </dl>
 <p class="Pp">new regular paragraph</p>
@@ -50,17 +40,13 @@ text
 <dl class="Bl-tag">
   <dt id="tag~4"><a class="permalink" href="#tag~4">tag</a></dt>
   <dd>indented regular text
-    <pre>
-indented
+    <pre>indented
 literal
-text
-    </pre>
+text</pre>
   </dd>
 </dl>
-<pre>
-new
+<pre>new
 literal
-paragraph
-</pre>
+paragraph</pre>
 regular text
 <br/>
Index: literal.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/RS/literal.out_html,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/RS/literal.out_html -Lregress/man/RS/literal.out_html -u -p -r1.2 -r1.3
--- regress/man/RS/literal.out_html
+++ regress/man/RS/literal.out_html
@@ -1,18 +1,12 @@
   <br/>
   initial regular text</p>
-<pre>
-literal text
-before display
-</pre>
+<pre>literal text
+before display</pre>
 <div class="Bd-indent">
-<pre>
-This is a short line.
-This is a very long line that would wrap if it weren't in literal context.
-</pre>
+<pre>This is a short line.
+This is a very long line that would wrap if it weren't in literal context.</pre>
 </div>
-<pre>
-literal text
-after display
-</pre>
+<pre>literal text
+after display</pre>
 <p class="Pp">final regular text
   <br/>
Index: literal.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/SY/literal.out_html,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lregress/man/SY/literal.out_html -Lregress/man/SY/literal.out_html -u -p -r1.3 -r1.4
--- regress/man/SY/literal.out_html
+++ regress/man/SY/literal.out_html
@@ -7,23 +7,17 @@
   </tr>
 </table>
 middle regular text
-<pre>
-literal text
-before display
-</pre>
+<pre>literal text
+before display</pre>
 <table class="Nm">
   <tr>
     <td><code class="Nm">command</code></td>
     <td>
-    <pre>
-<i>arguments</i>
-    </pre>
+    <pre><i>arguments</i></pre>
     </td>
   </tr>
 </table>
-<pre>
-literal text
-after display
-</pre>
+<pre>literal text
+after display</pre>
 <p class="Pp">final regular text
   <br/>
Index: literal.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/TP/literal.out_html,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lregress/man/TP/literal.out_html -Lregress/man/TP/literal.out_html -u -p -r1.4 -r1.5
--- regress/man/TP/literal.out_html
+++ regress/man/TP/literal.out_html
@@ -3,23 +3,17 @@
   <dd>regular indented text</dd>
 </dl>
 <p class="Pp">regular paragraph</p>
-<pre>
-literal
-text
-</pre>
+<pre>literal
+text</pre>
 <dl class="Bl-tag">
   <dt id="tag~2"><a class="permalink" href="#tag~2">tag</a></dt>
   <dd>
-    <pre>
-indented
+    <pre>indented
 literal
-text
-    </pre>
+text</pre>
   </dd>
 </dl>
-<pre>
-literal
-paragraph
-</pre>
+<pre>literal
+paragraph</pre>
 regular text
 <br/>
Index: paragraph.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/paragraph.out_html,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/mdoc/Bd/paragraph.out_html -Lregress/mdoc/Bd/paragraph.out_html -u -p -r1.5 -r1.6
--- regress/mdoc/Bd/paragraph.out_html
+++ regress/mdoc/Bd/paragraph.out_html
@@ -8,13 +8,11 @@
 back to normal
 <p class="Pp">another paragraph</p>
 <div class="Bd Pp" id="unfilled">
-<pre>
-<a class="permalink" href="#unfilled">unfilled</a> literal
+<pre><a class="permalink" href="#unfilled">unfilled</a> literal
 display
 <mark id="upara"></mark>
 <a class="permalink" href="#upara">unfilled</a> literal
-paragraph
-</pre>
+paragraph</pre>
 </div>
 again back to normal
 <br/>
Index: nf.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/nf.out_html,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/mdoc/Bd/nf.out_html -Lregress/mdoc/Bd/nf.out_html -u -p -r1.2 -r1.3
--- regress/mdoc/Bd/nf.out_html
+++ regress/mdoc/Bd/nf.out_html
@@ -1,20 +1,14 @@
-<pre>
-after .nf
-request
-</pre>
+<pre>after .nf
+request</pre>
 <p class="Pp">after .fi request</p>
 <div class="Bd Pp">
-<pre>
-in unfilled
-block
-</pre>
+<pre>in unfilled
+block</pre>
 after .fi request in unfilled block</div>
 after end of unfilled block
 <div class="Bd Pp">in filled block
-<pre>
-after .nf request
-in filled block
-</pre>
+<pre>after .nf request
+in filled block</pre>
 </div>
 after end of filled block
 <br/>
Index: fill-man.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/sp/fill-man.out_html,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/roff/sp/fill-man.out_html -Lregress/roff/sp/fill-man.out_html -u -p -r1.2 -r1.3
--- regress/roff/sp/fill-man.out_html
+++ regress/roff/sp/fill-man.out_html
@@ -1,7 +1,5 @@
 <p class="Pp">switch to no-fill mode:</p>
-<pre>
-in no-fill mode:
+<pre>in no-fill mode:
 
 back to
-fill mode:
-</pre>
+fill mode:</pre>
Index: dotT.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/string/dotT.out_html,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lregress/roff/string/dotT.out_html -Lregress/roff/string/dotT.out_html -u -p -r1.3 -r1.4
--- regress/roff/string/dotT.out_html
+++ regress/roff/string/dotT.out_html
@@ -1,3 +1,2 @@
 <p class="Pp">We are using the html device.</p>
 <p class="Pp">The device name can be overridden.</p>
-<pre>
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: In HTML output literal blocks should strip newline before closing pre
  2020-10-16 17:46 ` Ingo Schwarze
@ 2020-10-25 20:45   ` Michael Stapelberg
  2020-10-26 13:26     ` Ingo Schwarze
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Stapelberg @ 2020-10-25 20:45 UTC (permalink / raw)
  To: discuss

[-- Attachment #1: Type: text/plain, Size: 14247 bytes --]

Thanks for this fix!

Ingo, would you be willing to cut a new release anytime soon?
There have been a number of fixes, I think, that have not yet made it into
any release version.

Thanks,

On Fri, Oct 16, 2020 at 7:46 PM Ingo Schwarze <schwarze@usta.de> wrote:

> Hello Aman,
>
> Aman Verma wrote on Thu, Oct 15, 2020 at 04:48:50PM -0400:
>
> > The problem with `.Bd -literal` blocks in HTML output is that
> > mandoc doesn't output the closing pre tag on the same line.
> > If the element is indented, browsers will display an extra
> > line since pre is telling them to preserve whitespace.
> >
> > A good example of the issue is
> > <https://mandoc.bsd.lv/man/mdoc.7.html#NAME>.
> > The extra space is clearly visible. The source is
> >
> >         <pre>.Nm name0 ,
> >     .Nm name1 ,
> >     .Nm name2
> >     .Nd a one line description
> >         </pre>
> >
> > What I'm proposing is that it should look like
> >
> >         <pre>.Nm name0 ,
> >     .Nm name1 ,
> >     .Nm name2
> >     .Nd a one line description</pre>
> >
> > This is what most Markdown processors do to solve the issue.
>
> I think your analysis and proposed solution are both correct,
> so i committed the following fix and installed the corrected
> version in these locations:
>
>   https://mandoc.bsd.lv/man/
>   https://man.bsd.lv/mdoc.7
>   https://man.openbsd.org/mdoc.7
>
> Thank you for the bug report,
>   Ingo
>
>
> Log Message:
> -----------
> In HTML output, avoid printing a newline right after <pre>
> and right before </pre> because that resulted in vertical
> whitespace not requested by the manual page author.
>
> Formatting bug reported by
> Aman Verma <amanraoverma plus vim at gmail dot com> on discuss@.
>
> Modified Files:
> --------------
>     mandoc:
>         html.c
>         man_html.c
>         mdoc_html.c
>     mandoc/regress/man/HP:
>         literal.out_html
>     mandoc/regress/man/IP:
>         literal.out_html
>     mandoc/regress/man/RS:
>         literal.out_html
>     mandoc/regress/man/SY:
>         literal.out_html
>     mandoc/regress/man/TP:
>         literal.out_html
>     mandoc/regress/mdoc/Bd:
>         nf.out_html
>         paragraph.out_html
>     mandoc/regress/mdoc/Rs:
>         paragraph.out_html
>     mandoc/regress/roff/sp:
>         fill-man.out_html
>     mandoc/regress/roff/string:
>         dotT.out_html
>
> Revision Data
> -------------
> Index: paragraph.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Rs/paragraph.out_html,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -Lregress/mdoc/Rs/paragraph.out_html
> -Lregress/mdoc/Rs/paragraph.out_html -u -p -r1.4 -r1.5
> --- regress/mdoc/Rs/paragraph.out_html
> +++ regress/mdoc/Rs/paragraph.out_html
> @@ -13,4 +13,3 @@
>  <p class="Pp">in a paragraph:</p>
>  <p class="Pp"><cite class="Rs"><span class="RsA">another author</span>,
>      <i class="RsB">another book</i>.</cite></p>
> -<pre>
> Index: mdoc_html.c
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v
> retrieving revision 1.340
> retrieving revision 1.341
> diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.340 -r1.341
> --- mdoc_html.c
> +++ mdoc_html.c
> @@ -349,12 +349,11 @@ print_mdoc_node(MDOC_ARGS)
>         if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT)
>                 return;
>
> -       if (n->flags & NODE_NOFILL) {
> -               html_fillmode(h, ROFF_nf);
> -               if (n->flags & NODE_LINE)
> -                       print_endline(h);
> -       } else
> +       if ((n->flags & NODE_NOFILL) == 0)
>                 html_fillmode(h, ROFF_fi);
> +       else if (html_fillmode(h, ROFF_nf) == ROFF_nf &&
> +           n->tok != ROFF_fi && n->flags & NODE_LINE)
> +               print_endline(h);
>
>         child = 1;
>         n->flags &= ~NODE_ENDED;
> Index: man_html.c
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/man_html.c,v
> retrieving revision 1.178
> retrieving revision 1.179
> diff -Lman_html.c -Lman_html.c -u -p -r1.178 -r1.179
> --- man_html.c
> +++ man_html.c
> @@ -169,7 +169,12 @@ print_man_node(MAN_ARGS)
>         if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT)
>                 return;
>
> -       html_fillmode(h, n->flags & NODE_NOFILL ? ROFF_nf : ROFF_fi);
> +       if ((n->flags & NODE_NOFILL) == 0)
> +               html_fillmode(h, ROFF_fi);
> +       else if (html_fillmode(h, ROFF_nf) == ROFF_nf &&
> +           n->tok != ROFF_fi && n->flags & NODE_LINE &&
> +           (n->prev == NULL || n->prev->tok != MAN_YS))
> +               print_endline(h);
>
>         child = 1;
>         switch (n->type) {
> @@ -253,13 +258,6 @@ print_man_node(MAN_ARGS)
>         }
>         if (t != NULL)
>                 print_stagq(h, t);
> -
> -       if (n->flags & NODE_NOFILL && n->tok != MAN_YS &&
> -           (n->next != NULL && n->next->flags & NODE_LINE)) {
> -               /* In .nf = <pre>, print even empty lines. */
> -               h->col++;
> -               print_endline(h);
> -       }
>  }
>
>  static void
> Index: html.c
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/html.c,v
> retrieving revision 1.270
> retrieving revision 1.271
> diff -Lhtml.c -Lhtml.c -u -p -r1.270 -r1.271
> --- html.c
> +++ html.c
> @@ -81,7 +81,7 @@ static        const struct htmldata htmltags[TA
>         {"h1",          HTML_TOPHRASE | HTML_NLAROUND},
>         {"h2",          HTML_TOPHRASE | HTML_NLAROUND},
>         {"p",           HTML_TOPHRASE | HTML_NLAROUND | HTML_INDENT},
> -       {"pre",         HTML_TOPHRASE | HTML_NLALL | HTML_NOINDENT},
> +       {"pre",         HTML_TOPHRASE | HTML_NLAROUND | HTML_NOINDENT},
>         {"a",           HTML_INPHRASE | HTML_TOPHRASE},
>         {"b",           HTML_INPHRASE | HTML_TOPHRASE},
>         {"cite",        HTML_INPHRASE | HTML_TOPHRASE},
> Index: literal.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/man/HP/literal.out_html,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -Lregress/man/HP/literal.out_html -Lregress/man/HP/literal.out_html
> -u -p -r1.2 -r1.3
> --- regress/man/HP/literal.out_html
> +++ regress/man/HP/literal.out_html
> @@ -1,18 +1,12 @@
>  <p class="Pp HP">tag indented text</p>
>  <p class="Pp">regular paragraph</p>
> -<pre>
> -literal
> -text
> -</pre>
> -<pre>
> -tag
> +<pre>literal
> +text</pre>
> +<pre>tag
>  literal
>  hanged
> -paragraph
> -</pre>
> -<pre>
> -literal
> -paragraph
> -</pre>
> +paragraph</pre>
> +<pre>literal
> +paragraph</pre>
>  regular text
>  <br/>
> Index: literal.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/man/IP/literal.out_html,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -Lregress/man/IP/literal.out_html -Lregress/man/IP/literal.out_html
> -u -p -r1.6 -r1.7
> --- regress/man/IP/literal.out_html
> +++ regress/man/IP/literal.out_html
> @@ -3,42 +3,32 @@
>    <dd>indented regular text</dd>
>  </dl>
>  <p class="Pp">new regular paragraph</p>
> -<pre>
> -literal
> -text
> -</pre>
> +<pre>literal
> +text</pre>
>  <dl class="Bl-tag">
>    <dt id="tag~2"><a class="permalink" href="#tag~2">tag</a></dt>
>    <dd>
> -    <pre>
> -indented
> +    <pre>indented
>  literal
> -text
> -    </pre>
> +text</pre>
>    </dd>
>  </dl>
> -<pre>
> -new
> +<pre>new
>  literal
> -paragraph
> -</pre>
> +paragraph</pre>
>  regular text
>  <section class="Ss">
>  <h2 class="Ss" id="literal_into_indented_paragraph"><a class="permalink"
> href="#literal_into_indented_paragraph">literal
>    into indented paragraph</a></h2>
>  <p class="Pp">regular text</p>
> -<pre>
> -literal
> -text
> -</pre>
> +<pre>literal
> +text</pre>
>  <dl class="Bl-tag">
>    <dt id="tag~3"><a class="permalink" href="#tag~3">tag</a></dt>
>    <dd>
> -    <pre>
> -indented
> +    <pre>indented
>  literal
> -text
> -    </pre>
> +text</pre>
>      indented regular text</dd>
>  </dl>
>  <p class="Pp">new regular paragraph</p>
> @@ -50,17 +40,13 @@ text
>  <dl class="Bl-tag">
>    <dt id="tag~4"><a class="permalink" href="#tag~4">tag</a></dt>
>    <dd>indented regular text
> -    <pre>
> -indented
> +    <pre>indented
>  literal
> -text
> -    </pre>
> +text</pre>
>    </dd>
>  </dl>
> -<pre>
> -new
> +<pre>new
>  literal
> -paragraph
> -</pre>
> +paragraph</pre>
>  regular text
>  <br/>
> Index: literal.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/man/RS/literal.out_html,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -Lregress/man/RS/literal.out_html -Lregress/man/RS/literal.out_html
> -u -p -r1.2 -r1.3
> --- regress/man/RS/literal.out_html
> +++ regress/man/RS/literal.out_html
> @@ -1,18 +1,12 @@
>    <br/>
>    initial regular text</p>
> -<pre>
> -literal text
> -before display
> -</pre>
> +<pre>literal text
> +before display</pre>
>  <div class="Bd-indent">
> -<pre>
> -This is a short line.
> -This is a very long line that would wrap if it weren't in literal context.
> -</pre>
> +<pre>This is a short line.
> +This is a very long line that would wrap if it weren't in literal
> context.</pre>
>  </div>
> -<pre>
> -literal text
> -after display
> -</pre>
> +<pre>literal text
> +after display</pre>
>  <p class="Pp">final regular text
>    <br/>
> Index: literal.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/man/SY/literal.out_html,v
> retrieving revision 1.3
> retrieving revision 1.4
> diff -Lregress/man/SY/literal.out_html -Lregress/man/SY/literal.out_html
> -u -p -r1.3 -r1.4
> --- regress/man/SY/literal.out_html
> +++ regress/man/SY/literal.out_html
> @@ -7,23 +7,17 @@
>    </tr>
>  </table>
>  middle regular text
> -<pre>
> -literal text
> -before display
> -</pre>
> +<pre>literal text
> +before display</pre>
>  <table class="Nm">
>    <tr>
>      <td><code class="Nm">command</code></td>
>      <td>
> -    <pre>
> -<i>arguments</i>
> -    </pre>
> +    <pre><i>arguments</i></pre>
>      </td>
>    </tr>
>  </table>
> -<pre>
> -literal text
> -after display
> -</pre>
> +<pre>literal text
> +after display</pre>
>  <p class="Pp">final regular text
>    <br/>
> Index: literal.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/man/TP/literal.out_html,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -Lregress/man/TP/literal.out_html -Lregress/man/TP/literal.out_html
> -u -p -r1.4 -r1.5
> --- regress/man/TP/literal.out_html
> +++ regress/man/TP/literal.out_html
> @@ -3,23 +3,17 @@
>    <dd>regular indented text</dd>
>  </dl>
>  <p class="Pp">regular paragraph</p>
> -<pre>
> -literal
> -text
> -</pre>
> +<pre>literal
> +text</pre>
>  <dl class="Bl-tag">
>    <dt id="tag~2"><a class="permalink" href="#tag~2">tag</a></dt>
>    <dd>
> -    <pre>
> -indented
> +    <pre>indented
>  literal
> -text
> -    </pre>
> +text</pre>
>    </dd>
>  </dl>
> -<pre>
> -literal
> -paragraph
> -</pre>
> +<pre>literal
> +paragraph</pre>
>  regular text
>  <br/>
> Index: paragraph.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/paragraph.out_html,v
> retrieving revision 1.5
> retrieving revision 1.6
> diff -Lregress/mdoc/Bd/paragraph.out_html
> -Lregress/mdoc/Bd/paragraph.out_html -u -p -r1.5 -r1.6
> --- regress/mdoc/Bd/paragraph.out_html
> +++ regress/mdoc/Bd/paragraph.out_html
> @@ -8,13 +8,11 @@
>  back to normal
>  <p class="Pp">another paragraph</p>
>  <div class="Bd Pp" id="unfilled">
> -<pre>
> -<a class="permalink" href="#unfilled">unfilled</a> literal
> +<pre><a class="permalink" href="#unfilled">unfilled</a> literal
>  display
>  <mark id="upara"></mark>
>  <a class="permalink" href="#upara">unfilled</a> literal
> -paragraph
> -</pre>
> +paragraph</pre>
>  </div>
>  again back to normal
>  <br/>
> Index: nf.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/nf.out_html,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -Lregress/mdoc/Bd/nf.out_html -Lregress/mdoc/Bd/nf.out_html -u -p
> -r1.2 -r1.3
> --- regress/mdoc/Bd/nf.out_html
> +++ regress/mdoc/Bd/nf.out_html
> @@ -1,20 +1,14 @@
> -<pre>
> -after .nf
> -request
> -</pre>
> +<pre>after .nf
> +request</pre>
>  <p class="Pp">after .fi request</p>
>  <div class="Bd Pp">
> -<pre>
> -in unfilled
> -block
> -</pre>
> +<pre>in unfilled
> +block</pre>
>  after .fi request in unfilled block</div>
>  after end of unfilled block
>  <div class="Bd Pp">in filled block
> -<pre>
> -after .nf request
> -in filled block
> -</pre>
> +<pre>after .nf request
> +in filled block</pre>
>  </div>
>  after end of filled block
>  <br/>
> Index: fill-man.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/roff/sp/fill-man.out_html,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -Lregress/roff/sp/fill-man.out_html
> -Lregress/roff/sp/fill-man.out_html -u -p -r1.2 -r1.3
> --- regress/roff/sp/fill-man.out_html
> +++ regress/roff/sp/fill-man.out_html
> @@ -1,7 +1,5 @@
>  <p class="Pp">switch to no-fill mode:</p>
> -<pre>
> -in no-fill mode:
> +<pre>in no-fill mode:
>
>  back to
> -fill mode:
> -</pre>
> +fill mode:</pre>
> Index: dotT.out_html
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/regress/roff/string/dotT.out_html,v
> retrieving revision 1.3
> retrieving revision 1.4
> diff -Lregress/roff/string/dotT.out_html
> -Lregress/roff/string/dotT.out_html -u -p -r1.3 -r1.4
> --- regress/roff/string/dotT.out_html
> +++ regress/roff/string/dotT.out_html
> @@ -1,3 +1,2 @@
>  <p class="Pp">We are using the html device.</p>
>  <p class="Pp">The device name can be overridden.</p>
> -<pre>
> --
>  To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv
>
>

-- 
Best regards,
Michael

[-- Attachment #2: Type: text/html, Size: 19268 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: In HTML output literal blocks should strip newline before closing pre
  2020-10-25 20:45   ` Michael Stapelberg
@ 2020-10-26 13:26     ` Ingo Schwarze
  2020-10-26 13:42       ` Michael Stapelberg
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Schwarze @ 2020-10-26 13:26 UTC (permalink / raw)
  To: Michael Stapelberg; +Cc: discuss

Hi Michael,

Michael Stapelberg wrote on Sun, Oct 25, 2020 at 09:45:56PM +0100:

> Ingo, would you be willing to cut a new release anytime soon?

Yes, i have been eager to do that for quite some time already.

> There have been a number of fixes, I think, that have not yet made
> it into any release version.

There are still two holdups that i'm trying to get out of the way:

 1. A fuzzing run found a number of crashes, mostly assertion
    failures and NULL pointer accesses.  Most of these have already
    been fixed, but there is still a small number that need to be
    investigated.  I want to finish that before release because
    i do not want to make a release containing known bugs.

 2. Unfortunately, the GNU troff project
      https://www.gnu.org/software/groff/
    made the decision to also roll a release *right now*, and the
    last release of groff was also two years ago, so quite a few
    thinks changed over there, too, and there is some fallout to
    be dealt with.  Since i'm maintaining the groff port in OpenBSD
    and since i'm also a groff developer, i must make sure nothing
    goes wrong with that, which is draining some of my time that i
    would like to spend on fixing the last few issues found in the
    mandoc fuzzer run.

But we will be getting there...

Yours,
  Ingo
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: In HTML output literal blocks should strip newline before closing pre
  2020-10-26 13:26     ` Ingo Schwarze
@ 2020-10-26 13:42       ` Michael Stapelberg
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Stapelberg @ 2020-10-26 13:42 UTC (permalink / raw)
  To: discuss

[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]

That sounds reasonable! Thanks for sharing your plans.

On Mon, Oct 26, 2020 at 2:27 PM Ingo Schwarze <schwarze@usta.de> wrote:

> Hi Michael,
>
> Michael Stapelberg wrote on Sun, Oct 25, 2020 at 09:45:56PM +0100:
>
> > Ingo, would you be willing to cut a new release anytime soon?
>
> Yes, i have been eager to do that for quite some time already.
>
> > There have been a number of fixes, I think, that have not yet made
> > it into any release version.
>
> There are still two holdups that i'm trying to get out of the way:
>
>  1. A fuzzing run found a number of crashes, mostly assertion
>     failures and NULL pointer accesses.  Most of these have already
>     been fixed, but there is still a small number that need to be
>     investigated.  I want to finish that before release because
>     i do not want to make a release containing known bugs.
>
>  2. Unfortunately, the GNU troff project
>       https://www.gnu.org/software/groff/
>     made the decision to also roll a release *right now*, and the
>     last release of groff was also two years ago, so quite a few
>     thinks changed over there, too, and there is some fallout to
>     be dealt with.  Since i'm maintaining the groff port in OpenBSD
>     and since i'm also a groff developer, i must make sure nothing
>     goes wrong with that, which is draining some of my time that i
>     would like to spend on fixing the last few issues found in the
>     mandoc fuzzer run.
>
> But we will be getting there...
>
> Yours,
>   Ingo
> --
>  To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv
>
>

-- 
Best regards,
Michael

[-- Attachment #2: Type: text/html, Size: 2297 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-26 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 20:48 In HTML output literal blocks should strip newline before closing pre Aman Verma
2020-10-16 17:46 ` Ingo Schwarze
2020-10-25 20:45   ` Michael Stapelberg
2020-10-26 13:26     ` Ingo Schwarze
2020-10-26 13:42       ` Michael Stapelberg

discuss@mandoc.bsd.lv

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/mandoc-discuss

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 mandoc-discuss mandoc-discuss/ http://inbox.vuxu.org/mandoc-discuss \
		discuss@mandoc.bsd.lv
	public-inbox-index mandoc-discuss

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.discuss


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git