summaryrefslogtreecommitdiffstats
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-06 03:38:45 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-06 03:38:45 +0000
commitf1b8e7051e92af5f6c90c234ea75598ee7976318 (patch)
treee89f39da84ae391f6274db2c8a96f024fdf27709 /mdoc_man.c
parent5c488f049fc8ba35c593e62595b53c5e7baf56f8 (diff)
downloadmandoc-f1b8e7051e92af5f6c90c234ea75598ee7976318.tar.gz
better handle .Fo and .Fd without argument
better handle .Fo with more than one argument
Diffstat (limited to 'mdoc_man.c')
-rw-r--r--mdoc_man.c7
1 files changed, 5 insertions, 2 deletions
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);