diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 13:18:37 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 13:18:37 +0000 |
commit | efcc442499da0cc5d2453ac6d1c7d39375170826 (patch) | |
tree | 104025a00512ea58db586b9565fcaf7456de0be3 /mdoc_html.c | |
parent | 3c3f7e0626d591d610886eca631e57b473866ea4 (diff) | |
download | mandoc-efcc442499da0cc5d2453ac6d1c7d39375170826.tar.gz mandoc-efcc442499da0cc5d2453ac6d1c7d39375170826.tar.zst mandoc-efcc442499da0cc5d2453ac6d1c7d39375170826.zip |
Proper handling of `Rs' blocks in -Thtml.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index ade7d89b..d7a308c3 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.7 2009/09/24 11:55:28 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.8 2009/09/24 13:18:37 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -2015,26 +2015,20 @@ mdoc_pf_post(MDOC_ARGS) static int mdoc_rs_pre(MDOC_ARGS) { - struct htmlpair tag[2]; - int i; + struct htmlpair tag; if (MDOC_BLOCK != n->type) return(1); - tag[i = 0].key = ATTR_CLASS; - tag[i++].val = "ref"; - - if (n->prev && SEC_SYNOPSIS == n->sec) { - tag[i].key = ATTR_STYLE; - tag[i++].val = "margin-top: 1em;"; - } else if (SEC_SYNOPSIS != n->sec) { - tag[i].key = ATTR_STYLE; - tag[i++].val = "display: inline; margin-right: 1em"; + if (n->prev && SEC_SEE_ALSO == n->sec) { + tag.key = ATTR_STYLE; + tag.val = "margin-top: 1em;"; + print_otag(h, TAG_DIV, 1, &tag); } - /* FIXME: div's have spaces stripped--we want them. */ - - print_otag(h, TAG_DIV, i, tag); + tag.key = ATTR_CLASS; + tag.val = "ref"; + print_otag(h, TAG_SPAN, 1, &tag); return(1); } |