diff options
author | 2014-11-17 06:44:35 +0000 | |
---|---|---|
committer | 2014-11-17 06:44:35 +0000 | |
commit | 6f9818f67f5fe8cf9e8d6bca47a78366acf3c3e9 (patch) | |
tree | b0777b4cd8d9a9c2df65f3e459255c8fb7db05ea /usr.bin/mandoc/mdoc_man.c | |
parent | check spacing and behaviour in the SEE ALSO section as well (diff) | |
download | wireguard-openbsd-6f9818f67f5fe8cf9e8d6bca47a78366acf3c3e9.tar.xz wireguard-openbsd-6f9818f67f5fe8cf9e8d6bca47a78366acf3c3e9.zip |
Multiple fixes with respect to in-line macros:
* .No selects the default font; relevant e.g. in .Bf blocks
* no need to force empty .Li elements
* closing delimiters as leading macro arguments do not suppress space
* opening delimiters at the end of a macro line do not suppress space
* correctly handle delimiter spacing in -Tman
As a side effect, these fixes let mandoc warn about empty .No macros
as requested by bentley@.
Diffstat (limited to 'usr.bin/mandoc/mdoc_man.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_man.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c index 12230259bde..3e5e5e2eca2 100644 --- a/usr.bin/mandoc/mdoc_man.c +++ b/usr.bin/mandoc/mdoc_man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_man.c,v 1.70 2014/11/06 22:27:52 schwarze Exp $ */ +/* $OpenBSD: mdoc_man.c,v 1.71 2014/11/17 06:44:35 schwarze Exp $ */ /* * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> * @@ -592,7 +592,11 @@ print_node(DECL_ARGS) printf("\\&"); outflags &= ~MMAN_spc; } + if (outflags & MMAN_Sm && ! (n->flags & MDOC_DELIMC)) + outflags |= MMAN_spc_force; print_word(n->string); + if (outflags & MMAN_Sm && ! (n->flags & MDOC_DELIMO)) + outflags |= MMAN_spc; } else { /* * Conditionally run the pre-node action handler for a |