diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-04 21:49:39 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-04 21:49:39 +0000 |
commit | 67a51824265c8e0d0f41e8cacb1714e5671c7053 (patch) | |
tree | a42511e4878a1a70863b6e7ac3faa1e566a072a7 /mdoc_html.c | |
parent | 12bd5ba1acfc34cc1274b3b3d2c1a9e28978bb6e (diff) | |
download | mandoc-67a51824265c8e0d0f41e8cacb1714e5671c7053.tar.gz mandoc-67a51824265c8e0d0f41e8cacb1714e5671c7053.tar.zst mandoc-67a51824265c8e0d0f41e8cacb1714e5671c7053.zip |
Documented `In' in full.
Fixed `In' to behave properly: it wasn't properly breaking lines,
formatting, or really anything else. Noted COMPATIBILITY with
OpenBSD's groff, which pukes all over `In'.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 4506e127..e3ae9d9a 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.73 2010/06/04 21:05:39 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.74 2010/06/04 21:49:39 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -1823,31 +1823,16 @@ mdoc_in_pre(MDOC_ARGS) struct tag *t; struct htmlpair tag[2]; int i; - struct roffsu su; - - if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) { - if (n->next && MDOC_In != n->next->tok) { - SCALE_VS_INIT(&su, 1); - bufcat_su(h, "margin-bottom", &su); - PAIR_STYLE_INIT(&tag[0], h); - print_otag(h, TAG_DIV, 1, tag); - } else - print_otag(h, TAG_DIV, 0, NULL); - } - - /* FIXME: there's a buffer bug in here somewhere. */ PAIR_CLASS_INIT(&tag[0], "includes"); print_otag(h, TAG_SPAN, 1, tag); - if (SEC_SYNOPSIS == n->sec) + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) print_text(h, "#include"); print_text(h, "<"); h->flags |= HTML_NOSPACE; - /* XXX -- see warning in termp_in_post(). */ - for (nn = n->child; nn; nn = nn->next) { PAIR_CLASS_INIT(&tag[0], "link-includes"); i = 1; @@ -1865,6 +1850,9 @@ mdoc_in_pre(MDOC_ARGS) h->flags |= HTML_NOSPACE; print_text(h, ">"); + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) + print_otag(h, TAG_BR, 0, NULL); + return(0); } |