aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit7dfe6b3fdffd0ff76af3e3d347b0f300fddb15e8 (patch)
treec8da2ede0eced598b1c3160a92a64f654f8225ca /mdoc_man.c
parent21214100bde85df055d67a3ab4b9c51b8a2dd7fb (diff)
downloadmandoc-7dfe6b3fdffd0ff76af3e3d347b0f300fddb15e8.tar.gz
mandoc-7dfe6b3fdffd0ff76af3e3d347b0f300fddb15e8.tar.zst
mandoc-7dfe6b3fdffd0ff76af3e3d347b0f300fddb15e8.zip
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.c9
1 files changed, 6 insertions, 3 deletions
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 <schwarze@openbsd.org>
*
@@ -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);