summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-01-01 23:28:04 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-01-01 23:28:04 +0000
commitd5e89fb20f7eab0f2521e069e8bf424eb1fa2642 (patch)
tree2d92b0a1db322e1cf3aead3136b63573f3af103a /usr.bin
parent948ab75bf9a218a09abdf43a1310b4d4f9cf4d6b (diff)
When a .Fl macro without an argument is followed by text,
we need a space in between; patch by kristaps@, rev. 1.103 and 1.104; fixes regress/usr.bin/mandoc/mdoc/Fl/noarg.in.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/mdoc_term.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index 24e38c03476..9688fca09d3 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.66 2010/01/01 21:37:52 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.67 2010/01/01 23:28:03 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -1028,7 +1028,12 @@ termp_fl_pre(DECL_ARGS)
term_fontpush(p, TERMFONT_BOLD);
term_word(p, "\\-");
- p->flags |= TERMP_NOSPACE;
+
+ /* A blank `Fl' should incur a subsequent space. */
+
+ if (n->child)
+ p->flags |= TERMP_NOSPACE;
+
return(1);
}