From 6c9e7368eafc1fe651b675323e22e1759711e6da Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 19 Jan 2017 16:59:30 +0000 Subject: clean up markup of .Bd, .D1, .Dl, .Li, and .Ql; in particular, stop abuse of
--- html.c | 1 - html.h | 1 - mdoc_html.c | 22 +++++++++------------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/html.c b/html.c index 4f11864e..55917f43 100644 --- a/html.c +++ b/html.c @@ -75,7 +75,6 @@ static const struct htmldata htmltags[TAG_MAX] = { {"dl", HTML_NLALL | HTML_INDENT}, {"dt", HTML_NLAROUND}, {"dd", HTML_NLAROUND | HTML_INDENT}, - {"blockquote", HTML_NLALL | HTML_INDENT}, {"pre", HTML_NLALL | HTML_NOINDENT}, {"b", 0}, {"i", 0}, diff --git a/html.h b/html.h index 8cbfcda4..16be4bf6 100644 --- a/html.h +++ b/html.h @@ -40,7 +40,6 @@ enum htmltag { TAG_DL, TAG_DT, TAG_DD, - TAG_BLOCKQUOTE, TAG_PRE, TAG_B, TAG_I, diff --git a/mdoc_html.c b/mdoc_html.c index 28e2d555..a0d90316 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -846,14 +846,10 @@ mdoc_d1_pre(MDOC_ARGS) if (n->type != ROFFT_BLOCK) return 1; - print_otag(h, TAG_BLOCKQUOTE, "svtvb", 0, 0); + print_otag(h, TAG_DIV, "c", "D1"); - /* BLOCKQUOTE needs a block body. */ - - print_otag(h, TAG_DIV, "c", "display"); - - if (MDOC_Dl == n->tok) - print_otag(h, TAG_CODE, "c", "lit"); + if (n->tok == MDOC_Dl) + print_otag(h, TAG_CODE, "c", "Li"); return 1; } @@ -909,15 +905,15 @@ mdoc_bd_pre(MDOC_ARGS) offs = -1; if (offs == -1) - print_otag(h, TAG_DIV, "cswl", "display", n->norm->Bd.offs); + print_otag(h, TAG_DIV, "cswl", "Bd", n->norm->Bd.offs); else - print_otag(h, TAG_DIV, "cshl", "display", offs); + print_otag(h, TAG_DIV, "cshl", "Bd", offs); if (n->norm->Bd.type != DISP_unfilled && n->norm->Bd.type != DISP_literal) return 1; - print_otag(h, TAG_PRE, "c", "lit"); + print_otag(h, TAG_PRE, "c", "Li"); /* This can be recursive: save & set our literal state. */ @@ -1414,7 +1410,7 @@ mdoc_bf_pre(MDOC_ARGS) else if (FONT_Sy == n->norm->Bf.font) cattr = "symb"; else if (FONT_Li == n->norm->Bf.font) - cattr = "lit"; + cattr = "Li"; else cattr = "none"; @@ -1473,7 +1469,7 @@ mdoc_no_pre(MDOC_ARGS) static int mdoc_li_pre(MDOC_ARGS) { - print_otag(h, TAG_CODE, "c", "lit"); + print_otag(h, TAG_CODE, "c", "Li"); return 1; } @@ -1656,7 +1652,7 @@ mdoc_quote_pre(MDOC_ARGS) case MDOC_Ql: print_text(h, "\\(oq"); h->flags |= HTML_NOSPACE; - print_otag(h, TAG_CODE, "c", "lit"); + print_otag(h, TAG_CODE, "c", "Li"); break; case MDOC_So: case MDOC_Sq: -- cgit