aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-15 16:08:18 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-15 16:08:18 +0000
commit14f8098a80790dfef4d10f39f0e49943128577ed (patch)
tree91feb41f31d742c10644381204a014a95ca1ff59 /mdoc_html.c
parentbefebc7c5c80a346b63f3f1eb319636ef8e63710 (diff)
downloadmandoc-14f8098a80790dfef4d10f39f0e49943128577ed.tar.gz
mandoc-14f8098a80790dfef4d10f39f0e49943128577ed.tar.zst
mandoc-14f8098a80790dfef4d10f39f0e49943128577ed.zip
Clarify purpose of "lit".
Make `Dl' and `D1' both use BLOCKQUOTE instead of DIVs.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 138e36e6..7d62474a 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.117 2010/12/15 15:59:23 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.118 2010/12/15 16:08:18 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -1133,13 +1133,17 @@ mdoc_d1_pre(MDOC_ARGS)
if (MDOC_BLOCK != n->type)
return(1);
- /* FIXME: D1 shouldn't be literal. */
+ SCALE_VS_INIT(&su, 0);
+ bufcat_su(h, "margin-top", &su);
+ bufcat_su(h, "margin-bottom", &su);
+ PAIR_STYLE_INIT(&tag[0], h);
+
+ if (MDOC_Dl == n->tok) {
+ PAIR_CLASS_INIT(&tag[1], "lit");
+ print_otag(h, TAG_BLOCKQUOTE, 2, tag);
+ } else
+ print_otag(h, TAG_BLOCKQUOTE, 1, tag);
- SCALE_VS_INIT(&su, INDENT - 2);
- bufcat_su(h, "margin-left", &su);
- PAIR_CLASS_INIT(&tag[0], "lit");
- PAIR_STYLE_INIT(&tag[1], h);
- print_otag(h, TAG_DIV, 2, tag);
return(1);
}