aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-11-17 06:44:58 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-11-17 06:44:58 +0000
commita95737d0fe7d58cea73235887cdce9f58bae1335 (patch)
treeb1e382b6e729e9db6aff88da6d68fc0cb999f2af /mdoc_man.c
parent194fdd32fe2e8d95e8130915d406a4509ac1caf7 (diff)
downloadmandoc-a95737d0fe7d58cea73235887cdce9f58bae1335.tar.gz
mandoc-a95737d0fe7d58cea73235887cdce9f58bae1335.tar.zst
mandoc-a95737d0fe7d58cea73235887cdce9f58bae1335.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 'mdoc_man.c')
-rw-r--r--mdoc_man.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index e0fbeeb4..e67e692b 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.72 2014/11/06 22:28:36 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.73 2014/11/17 06:44:58 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -594,7 +594,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