From 7dfe6b3fdffd0ff76af3e3d347b0f300fddb15e8 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 6 Feb 2015 03:38:45 +0000 Subject: better handle .Fo and .Fd without argument better handle .Fo with more than one argument --- mdoc_man.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mdoc_man.c') diff --git a/mdoc_man.c b/mdoc_man.c index 2be9945e..eee1e3a7 100644 --- a/mdoc_man.c +++ b/mdoc_man.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.84 2015/02/01 23:10:35 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.85 2015/02/06 03:38:45 schwarze Exp $ */ /* * Copyright (c) 2011-2015 Ingo Schwarze * @@ -1284,12 +1284,14 @@ pre_fo(DECL_ARGS) pre_syn(n); break; case MDOC_HEAD: + if (n->child == NULL) + return(0); if (MDOC_SYNPRETTY & n->flags) print_block(".HP 4n", MMAN_nl); font_push('B'); break; case MDOC_BODY: - outflags &= ~MMAN_spc; + outflags &= ~(MMAN_spc | MMAN_nl); print_word("("); outflags &= ~MMAN_spc; break; @@ -1305,7 +1307,8 @@ post_fo(DECL_ARGS) switch (n->type) { case MDOC_HEAD: - font_pop(); + if (n->child != NULL) + font_pop(); break; case MDOC_BODY: post_fn(meta, n); -- cgit v1.2.3