summaryrefslogtreecommitdiffstats
path: root/mdoc_man.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_man.c')
-rw-r--r--mdoc_man.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index 8ea1e166..d21cad56 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -256,6 +256,7 @@ static int outflags;
#define MMAN_An_split (1 << 9) /* author mode is "split" */
#define MMAN_An_nosplit (1 << 10) /* author mode is "nosplit" */
#define MMAN_PD (1 << 11) /* inter-paragraph spacing disabled */
+#define MMAN_nbrword (1 << 12) /* do not break the next word */
#define BL_STACK_MAX 32
@@ -364,6 +365,12 @@ print_word(const char *s)
case (ASCII_HYPH):
putchar('-');
break;
+ case (' '):
+ if (MMAN_nbrword & outflags) {
+ printf("\\ ");
+ break;
+ }
+ /* FALLTHROUGH */
default:
putchar((unsigned char)*s);
break;
@@ -371,6 +378,7 @@ print_word(const char *s)
if (TPremain)
TPremain--;
}
+ outflags &= ~MMAN_nbrword;
}
static void
@@ -1028,6 +1036,8 @@ pre_fa(DECL_ARGS)
while (NULL != n) {
font_push('I');
+ if (MDOC_SYNPRETTY & n->flags)
+ outflags |= MMAN_nbrword;
print_node(meta, n);
font_pop();
if (NULL != (n = n->next))