diff options
author | 2010-08-20 22:51:29 +0000 | |
---|---|---|
committer | 2010-08-20 22:51:29 +0000 | |
commit | 1a3bd1cb27795956ca71c666968330b81362d013 (patch) | |
tree | e134124120cda256b3474404a177323c6854db92 /mdoc_term.c | |
parent | 223727dbba0bff013b3bacc8607570b2b41667c1 (diff) | |
download | mandoc-1a3bd1cb27795956ca71c666968330b81362d013.tar.gz mandoc-1a3bd1cb27795956ca71c666968330b81362d013.tar.zst mandoc-1a3bd1cb27795956ca71c666968330b81362d013.zip |
.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.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 59c84767..1750b7df 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.181 2010/08/09 00:00:37 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.182 2010/08/20 22:51:29 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -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; } |