summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/tbl_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-02-05 18:13:29 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-02-05 18:13:29 +0000
commit1647f8df95493c0855390d74810d4925f7b3aec4 (patch)
tree4a5be58707bd422d7963cb0f369c0d026e8b01b5 /usr.bin/mandoc/tbl_html.c
parentc209894806b3b7e37931ecc68cb218a1893f8141 (diff)
Improve <table> syntax:
The <col> element can only appear inside <colgroup>, so use <colgroup>. The <tbody> element is optional and useless, so don't use it. Even if we would ever need <thead> or <tfoot>, <tbody> would still be optional and useless; besides, we will likely never need <thead> or <tfoot>, simply because our languages don't support such functionality.
Diffstat (limited to 'usr.bin/mandoc/tbl_html.c')
-rw-r--r--usr.bin/mandoc/tbl_html.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mandoc/tbl_html.c b/usr.bin/mandoc/tbl_html.c
index f645f462b00..38515498c25 100644
--- a/usr.bin/mandoc/tbl_html.c
+++ b/usr.bin/mandoc/tbl_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tbl_html.c,v 1.14 2017/01/17 01:47:46 schwarze Exp $ */
+/* $OpenBSD: tbl_html.c,v 1.15 2017/02/05 18:13:28 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -48,6 +48,7 @@ html_tbl_strlen(const char *p, void *arg)
static void
html_tblopen(struct html *h, const struct tbl_span *sp)
{
+ struct tag *t;
int ic;
if (h->tbl.cols == NULL) {
@@ -59,10 +60,10 @@ html_tblopen(struct html *h, const struct tbl_span *sp)
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_otag(h, TAG_TBODY, "");
+ print_tagq(h, t);
}
void