From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [129.13.231.82]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 33753d6e for ; Thu, 28 Feb 2019 11:45:54 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1gzOoi-0004V7-5q; Thu, 28 Feb 2019 17:45:53 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1gzOoh-0001Cl-B7; Thu, 28 Feb 2019 17:45:51 +0100 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1gzOoh-0006Tn-5m; Thu, 28 Feb 2019 17:45:51 +0100 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id 4ca0a891; Thu, 28 Feb 2019 17:45:51 +0100 (CET) Date: Thu, 28 Feb 2019 17:45:51 +0100 From: Ingo Schwarze To: Pali Rohar Cc: discuss@mandoc.bsd.lv Subject: Re: mandoc & perl documentation Message-ID: <20190228164551.GB80399@athene.usta.de> References: <20180913151226.oaon3nvlvgcqioau@pali> <20181011075247.2jo4of7bkpvhkekm@pali> <20181023174545.GD58247@athene.usta.de> <20181024080322.hc6ifwgydpccjif3@pali> <20181025015133.GD20422@athene.usta.de> <20181025081035.qo3i4vrrkm2nwnbf@pali> <20181025213027.GA41690@athene.usta.de> <20181026081519.jbqkllanc4x7snod@pali> <20181124193152.GC16061@athene.usta.de> <20181125133426.s77sfsadbkz6jhcl@pali> X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181125133426.s77sfsadbkz6jhcl@pali> User-Agent: Mutt/1.8.0 (2017-02-23) Hi, i just implement yet another suggestion that came up in this conversation, see the commit below. The only TODO item i'm aware of that is still open following the reports from Pali Rohar is this one: - format ".IP *" etc. as
    rather than
    https://github.com/Debian/debiman/issues/67 reminded by Pali Rohar 25 Nov 2018 14:34:26 +0100 loc ** exist ** algo ** size * imp *** It will eventually get done, too. Yours, Ingo Log Message: ----------- Format multiple subsequent .IP or multiple subsequent .TP/.TQ as a single
    list rather than opening a new list for each item; feature suggested by Pali dot Rohar at gmail dot com. Modified Files: -------------- mandoc: TODO man_html.c Revision Data ------------- Index: man_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/man_html.c,v retrieving revision 1.170 retrieving revision 1.171 diff -Lman_html.c -Lman_html.c -u -p -r1.170 -r1.171 --- man_html.c +++ man_html.c @@ -233,7 +233,25 @@ print_man_node(MAN_ARGS) /* This will automatically close out any font scope. */ t->refcnt--; - print_stagq(h, t); + if (n->type == ROFFT_BLOCK && + (n->tok == MAN_IP || n->tok == MAN_TP || n->tok == MAN_TQ)) { + t = h->tag; + while (t->tag != TAG_DL) + t = t->next; + /* + * Close the list if no further item of the same type + * follows; otherwise, close the item only. + */ + if (n->next == NULL || + (n->tok == MAN_IP && n->next->tok != MAN_IP) || + (n->tok != MAN_IP && + n->next->tok != MAN_TP && n->next->tok != MAN_TQ)) { + print_tagq(h, t); + t = NULL; + } + } + if (t != NULL) + print_stagq(h, t); if (n->flags & NODE_NOFILL && n->tok != MAN_YS && (n->next != NULL && n->next->flags & NODE_LINE)) { @@ -399,7 +417,15 @@ man_IP_pre(MAN_ARGS) switch (n->type) { case ROFFT_BLOCK: html_close_paragraph(h); - print_otag(h, TAG_DL, "c", "Bl-tag"); + /* + * Open a new list unless there is an immediately + * preceding item of the same type. + */ + if (n->prev == NULL || + (n->tok == MAN_IP && n->prev->tok != MAN_IP) || + (n->tok != MAN_IP && + n->prev->tok != MAN_TP && n->prev->tok != MAN_TQ)) + print_otag(h, TAG_DL, "c", "Bl-tag"); return 1; case ROFFT_HEAD: print_otag(h, TAG_DT, ""); Index: TODO =================================================================== RCS file: /home/cvs/mandoc/mandoc/TODO,v retrieving revision 1.283 retrieving revision 1.284 diff -LTODO -LTODO -u -p -r1.283 -r1.284 --- TODO +++ TODO @@ -349,11 +349,6 @@ are mere guesses, and some may be wrong. it does seem cleaner.) loc ** exist ** algo * size * imp *** -- format multiple subsequent .IP as a single list - rather than opening a new list for each item - Pali Rohar 25 Nov 2018 14:34:26 +0100 - loc * exist ** algo * size * imp *** - - format ".IP *" etc. as
      rather than
      https://github.com/Debian/debiman/issues/67 reminded by Pali Rohar 25 Nov 2018 14:34:26 +0100 -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv