tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: Kristaps Dzonsons <kristaps@bsd.lv>
Cc: tech@mdocml.bsd.lv
Subject: Re: HTML5 redux
Date: Thu, 14 Aug 2014 03:25:40 +0200	[thread overview]
Message-ID: <20140814012540.GI26534@iris.usta.de> (raw)
In-Reply-To: <53EBE549.2000100@bsd.lv>

Hi Kristaps,

Kristaps Dzonsons wrote on Thu, Aug 14, 2014 at 12:23:05AM +0200:

> Enclosed is another patch for HTML5.  This one is designed to *add*
> HTML5.  So it creates an extra shim.  Subsequent patches would then
> remove the existing functionality.  I think this is a good step:
> first we add it, then we can start to decrease the complexity.

I don't object to that route.

I'd probably not merge to the VERSION_1_12 branch until the release
is done, and i'd probably merge to OpenBSD after the cleanup is done.

> It consists of the following:
> 
>  - a single <meta charset="utf-8" />
>  - removed summary, align, and width attributes from header/footer
>  - remove <col /> from header/footer
>  - add a <style /> shim *before* the <link /> to provide a default
> layout of the header/footer (instead of the hard-coded crap)
> 
> (The <style /> shim would work with HTML4 as well, but eh.)
> 
> With this patch, both -Thtml and -Txhtml will produce HTML5.  This
> can be disabled in html.c by replacing the HTML_HTML5 allocation
> with the respective type.  The resulting HTML5 validates just fine,
> as do the existing modes (if replaced in html.c).

Not for me, there is one regression.

But if you remove the chunk cited below, the regression goes
away, so i'd say, go ahead - in particular if you plan to do the
cleanup right afterwards.

> Index: html.c
> ===================================================================
> RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.c,v
> retrieving revision 1.162
> diff -u -p -r1.162 html.c
> --- html.c	13 Aug 2014 20:34:29 -0000	1.162
> +++ html.c	13 Aug 2014 21:29:43 -0000
> @@ -68,13 +68,14 @@ static	const struct htmldata htmltags[TA
>  	{"dt",		HTML_CLRLINE}, /* TAG_DT */
>  	{"dd",		HTML_CLRLINE}, /* TAG_DD */
>  	{"blockquote",	HTML_CLRLINE}, /* TAG_BLOCKQUOTE */
> -	{"p",		HTML_CLRLINE | HTML_NOSTACK | HTML_AUTOCLOSE}, /* TAG_P */
> +	{"p",		HTML_CLRLINE}, /* TAG_P */

This change causes regressions for me.
If i remove that chunk, it works fine.

Sample output:

<div class="section">
<h1 id="x4445534352495054494f4e">DESCRIPTION</h1> normal line of text second nor
mal line<br>
 line with a leading space <span class="unix">UNIX</span> normal line after a ma
cro line <span class="unix">UNIX</span><br>
 leading space after a macro line<p>   ### look here
<pre style="margin-left: 0.00ex;" class="lit display">
normal line in a literal display 
 leading space in a literal display 
another normal line</pre>
</p>   ### and here
<p>
<div style="margin-left: 0.00ex;" class="display">
normal line in a filled display<br>
 leading space in a filled display another normal line</div>
</p>   ### and here
</div>

Sample input:

/usr/src/regress/usr.bin/mandoc/char/space/leading-mdoc.in

Yours,
  Ingo
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2014-08-14  1:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 22:23 Kristaps Dzonsons
2014-08-14  1:25 ` Ingo Schwarze [this message]
2014-08-14 20:26   ` Kristaps Dzonsons
2014-08-14 23:50     ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140814012540.GI26534@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=kristaps@bsd.lv \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).