From 8521b0bc6a75dbf2d60be65720832c7020cebee4 Mon Sep 17 00:00:00 2001 From: schwarze Date: Thu, 18 Feb 2010 02:11:25 +0000 Subject: sync to release 1.9.15: * corrected .Vt handling (spotted by Joerg Sonnenberger) * corrected .Xr argument handling (based on my patch) * removed \\ escape sequence (because it is for low-level roff only) * warn about trailing whitespace (suggested by jmc@) * -Txhtml support * and some general cleanup and doc improvements --- usr.bin/mandoc/mdoc_html.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'usr.bin/mandoc/mdoc_html.c') diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index ca34fa46656..d3eefba017b 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.6 2010/01/02 02:42:06 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.7 2010/02/18 02:11:26 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -262,7 +262,7 @@ html_mdoc(void *arg, const struct mdoc *m) h = (struct html *)arg; - print_gen_doctype(h); + print_gen_decls(h); t = print_otag(h, TAG_HTML, 0, NULL); print_mdoc(mdoc_meta(m), mdoc_node(m), h); print_tagq(h, t); @@ -1579,7 +1579,7 @@ mdoc_vt_pre(MDOC_ARGS) struct htmlpair tag; struct roffsu su; - if (SEC_SYNOPSIS == n->sec) { + if (MDOC_BLOCK == n->type) { if (n->prev && MDOC_Vt != n->prev->tok) { SCALE_VS_INIT(&su, 1); bufcat_su(h, "margin-top", &su); @@ -1587,7 +1587,10 @@ mdoc_vt_pre(MDOC_ARGS) print_otag(h, TAG_DIV, 1, &tag); } else print_otag(h, TAG_DIV, 0, NULL); - } + + return(1); + } else if (MDOC_HEAD == n->type) + return(0); PAIR_CLASS_INIT(&tag, "type"); print_otag(h, TAG_SPAN, 1, &tag); -- cgit v1.2.3-59-g8ed1b