summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-08-20 22:51:25 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-08-20 22:51:25 +0000
commitc1db5b0ccbbb54f8752836e6c3ea8690f79d7733 (patch)
tree166a85717e7d85f4b4ad1c999ad3919418926eb1 /usr.bin/mandoc
parenta7b84462575de062e92b1f762aa3be2c727f4f45 (diff)
.Bl -column phrases ignore spacing rules for trailing punctuation
and render it just like normal text. Minimal fix of a formatting bug in operator(7) reported by ray@.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/mdoc_term.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index 0c27386a917..0ec43c61e61 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.101 2010/08/18 01:45:22 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.102 2010/08/20 22:51:24 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -838,6 +838,8 @@ termp_it_pre(DECL_ARGS)
if (MDOC_BODY == n->prev->type)
p->flags |= TERMP_NOLPAD;
+ p->flags |= TERMP_IGNDELIM;
+
break;
case (LIST_diag):
if (MDOC_HEAD == n->type)
@@ -996,6 +998,13 @@ termp_it_post(DECL_ARGS)
p->flags &= ~TERMP_TWOSPACE;
p->flags &= ~TERMP_NOLPAD;
p->flags &= ~TERMP_HANG;
+
+ /*
+ * TERMP_IGNDELIM is also set by `Pf', but it is safe
+ * to clear it here because `Pf' cannot contain `It'.
+ */
+
+ p->flags &= ~TERMP_IGNDELIM;
}
@@ -1800,6 +1809,10 @@ static void
termp_pf_post(DECL_ARGS)
{
+ /*
+ * XXX Resetting TERMP_IGNDELIM here is not safe
+ * because `Pf' can be used inside `Bl -column'.
+ */
p->flags &= ~TERMP_IGNDELIM;
p->flags |= TERMP_NOSPACE;
}