From 67a51824265c8e0d0f41e8cacb1714e5671c7053 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 4 Jun 2010 21:49:39 +0000 Subject: 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'. --- mdoc_html.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'mdoc_html.c') 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 * @@ -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); } -- cgit v1.2.3