summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-08-20 22:51:29 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-08-20 22:51:29 +0000
commitffbd731dc451c848b76e3a18e38fd28e9f34e6b7 (patch)
tree93ec52912164e4952d0dd187d12c979d0b8c6f00 /mdoc_term.c
parent3da43777572aa0ff7a2a4c7e97ebf7aaedd9bfa2 (diff)
downloadmandoc-ffbd731dc451c848b76e3a18e38fd28e9f34e6b7.tar.gz
.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 'mdoc_term.c')
-rw-r--r--mdoc_term.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 55d5d1e8..e521a0ce 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -842,6 +842,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)
@@ -1000,6 +1002,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;
}
@@ -1804,6 +1813,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;
}