diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-01-19 16:56:54 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-01-19 16:56:54 +0000 |
commit | 4b728c68f3744629640dbbc93189b831529a5678 (patch) | |
tree | 4e636f7025726cfb82ffd41f1c17fdb0a6390ef5 /usr.bin/mandoc | |
parent | b5e8bf2d0c73c986a71d7dbbe0bf71496fbf3392 (diff) |
clean up markup of .Bd, .D1, .Dl, .Li, and .Ql;
in particular, stop abuse of <blockquote>
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/html.c | 3 | ||||
-rw-r--r-- | usr.bin/mandoc/html.h | 3 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 24 |
3 files changed, 12 insertions, 18 deletions
diff --git a/usr.bin/mandoc/html.c b/usr.bin/mandoc/html.c index 16cc7ca6732..a89aff0ef6b 100644 --- a/usr.bin/mandoc/html.c +++ b/usr.bin/mandoc/html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: html.c,v 1.68 2017/01/19 15:27:26 schwarze Exp $ */ +/* $OpenBSD: html.c,v 1.69 2017/01/19 16:56:53 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -73,7 +73,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/usr.bin/mandoc/html.h b/usr.bin/mandoc/html.h index 8434f6f7143..c74d3ace485 100644 --- a/usr.bin/mandoc/html.h +++ b/usr.bin/mandoc/html.h @@ -1,4 +1,4 @@ -/* $OpenBSD: html.h,v 1.39 2017/01/19 01:00:11 schwarze Exp $ */ +/* $OpenBSD: html.h,v 1.40 2017/01/19 16:56:53 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -40,7 +40,6 @@ enum htmltag { TAG_DL, TAG_DT, TAG_DD, - TAG_BLOCKQUOTE, TAG_PRE, TAG_B, TAG_I, diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index 04ad77fff93..746fb401ad9 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_html.c,v 1.129 2017/01/19 15:48:34 schwarze Exp $ */ +/* $OpenBSD: mdoc_html.c,v 1.130 2017/01/19 16:56:53 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -844,14 +844,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; } @@ -907,15 +903,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. */ @@ -1412,7 +1408,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"; @@ -1471,7 +1467,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; } @@ -1654,7 +1650,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: |