* mandoc: Do not write <colgroup> elements.
@ 2018-06-25 13:46 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-06-25 13:46 UTC (permalink / raw)
To: source
Log Message:
-----------
Do not write <colgroup> 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 <COL> 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-25 13:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 13:46 mandoc: Do not write <colgroup> elements schwarze
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).