From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 87ef7b28 for ; Mon, 25 Jun 2018 08:46:27 -0500 (EST) Date: Mon, 25 Jun 2018 08:46:27 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Do not write elements. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-Id: Log Message: ----------- Do not write elements. Their only purpose is to enforce author-specified column widths, which can harm responsive design and provide no real benefit: HTML rendering engines usually do just fine automatically selecting appropriate column widths. Modified Files: -------------- mandoc: html.c html.h mdoc_html.c tbl_html.c Revision Data ------------- Index: mdoc_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v retrieving revision 1.306 retrieving revision 1.307 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.306 -r1.307 --- mdoc_html.c +++ mdoc_html.c @@ -750,39 +750,19 @@ static int mdoc_bl_pre(MDOC_ARGS) { char cattr[28]; - struct tag *t; struct mdoc_bl *bl; - size_t i; enum htmltag elemtype; - bl = &n->norm->Bl; - switch (n->type) { case ROFFT_BODY: return 1; - case ROFFT_HEAD: - if (bl->type != LIST_column || bl->ncols == 0) - return 0; - - /* - * For each column, print out the tag with our - * suggested width. The last column gets min-width, as - * in terminal mode it auto-sizes to the width of the - * screen and we want to preserve that behaviour. - */ - - t = print_otag(h, TAG_COLGROUP, ""); - for (i = 0; i < bl->ncols - 1; i++) - print_otag(h, TAG_COL, "sw+w", bl->cols[i]); - print_otag(h, TAG_COL, "swW", bl->cols[i]); - print_tagq(h, t); return 0; - default: break; } + bl = &n->norm->Bl; switch (bl->type) { case LIST_bullet: elemtype = TAG_UL; Index: html.h =================================================================== RCS file: /home/cvs/mandoc/mandoc/html.h,v retrieving revision 1.90 retrieving revision 1.91 diff -Lhtml.h -Lhtml.h -u -p -r1.90 -r1.91 --- html.h +++ html.h @@ -31,8 +31,6 @@ enum htmltag { TAG_BR, TAG_A, TAG_TABLE, - TAG_COLGROUP, - TAG_COL, TAG_TR, TAG_TD, TAG_LI, Index: html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/html.c,v retrieving revision 1.234 retrieving revision 1.235 diff -Lhtml.c -Lhtml.c -u -p -r1.234 -r1.235 --- html.c +++ html.c @@ -69,8 +69,6 @@ static const struct htmldata htmltags[TA {"br", HTML_NOSTACK | HTML_AUTOCLOSE | HTML_NLALL}, {"a", 0}, {"table", HTML_NLALL | HTML_INDENT}, - {"colgroup", HTML_NLALL | HTML_INDENT}, - {"col", HTML_NOSTACK | HTML_AUTOCLOSE | HTML_NLALL}, {"tr", HTML_NLALL | HTML_INDENT}, {"td", HTML_NLAROUND}, {"li", HTML_NLAROUND | HTML_INDENT}, Index: tbl_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/tbl_html.c,v retrieving revision 1.23 retrieving revision 1.24 diff -Ltbl_html.c -Ltbl_html.c -u -p -r1.23 -r1.24 --- tbl_html.c +++ tbl_html.c @@ -79,23 +79,14 @@ html_tbl_sulen(const struct roffsu *su, static void html_tblopen(struct html *h, const struct tbl_span *sp) { - struct tag *t; - int ic; - if (h->tbl.cols == NULL) { h->tbl.len = html_tbl_len; h->tbl.slen = html_tbl_strlen; h->tbl.sulen = html_tbl_sulen; tblcalc(&h->tbl, sp, 0, 0); } - assert(NULL == h->tblt); h->tblt = print_otag(h, TAG_TABLE, "c", "tbl"); - - t = print_otag(h, TAG_COLGROUP, ""); - for (ic = 0; ic < sp->opts->cols; ic++) - print_otag(h, TAG_COL, "shw", h->tbl.cols[ic].width); - print_tagq(h, t); } void -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv