From f1b8e7051e92af5f6c90c234ea75598ee7976318 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mdoc_man.c') diff --git a/mdoc_man.c b/mdoc_man.c index 131e1f3f..ad3fc626 100644 --- a/mdoc_man.c +++ b/mdoc_man.c @@ -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