diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-08-21 14:01:00 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-08-21 14:01:00 +0000 |
commit | 8cb590f51f5a25b344d691b787f79c0ecfba01ce (patch) | |
tree | ed291c7f645d46c1e16a28122b516649baf0dee5 /usr.bin/mandoc | |
parent | 7ff32a218d73feedf82395603c7016731e6b4089 (diff) |
Backout previous.
As Kristaps found out, i was wrong: .Bl -column phrases do not ignore
spacing rules for trailing punctuation in general. In particular,
- the rightmost column of a column list is unaffected
- columns terminated by the .Ta macro instead of a tab are unaffected
- columns ending in a blank are unaffected
Spacing rules for trailing punctuation are only ignored when the tab
follows the punctuation immediately, without a blank in between,
because then the combination of punctuation and tab is treated by roff
as a word, and the punctuation is not recognized as isolated.
The reason this doesn't work in mandoc is that in the special case
of .Bl -column (not in general!), mandoc treats tabs as word delimiters.
We either need to solve this differently, or call it a bug in roff.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/mdoc_term.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index 0ec43c61e61..668ab4f77eb 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.102 2010/08/20 22:51:24 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.103 2010/08/21 14:00:59 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -838,8 +838,6 @@ 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) @@ -998,13 +996,6 @@ 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; } @@ -1809,10 +1800,6 @@ 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; } |