diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-06 03:38:45 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-06 03:38:45 +0000 |
commit | f1b8e7051e92af5f6c90c234ea75598ee7976318 (patch) | |
tree | e89f39da84ae391f6274db2c8a96f024fdf27709 /mdoc_man.c | |
parent | 5c488f049fc8ba35c593e62595b53c5e7baf56f8 (diff) | |
download | mandoc-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.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); |