diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-09-03 00:29:21 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-09-03 00:29:21 +0000 |
commit | 19700ec8d05d92a66fbcf8a8040f0b00c7e94de4 (patch) | |
tree | 2d77a76aec6a5b13fa521cbcefa705ea43bab697 | |
parent | ca69e819a0548e61d559a073c81a8124b5a4bf47 (diff) | |
download | mandoc-19700ec8d05d92a66fbcf8a8040f0b00c7e94de4.tar.gz mandoc-19700ec8d05d92a66fbcf8a8040f0b00c7e94de4.tar.zst mandoc-19700ec8d05d92a66fbcf8a8040f0b00c7e94de4.zip |
Fix handling of font modifiers in tables. Noted by Brad Smith.
-rw-r--r-- | tbl.7 | 19 | ||||
-rw-r--r-- | tbl_layout.c | 12 |
2 files changed, 25 insertions, 6 deletions
@@ -1,4 +1,4 @@ -.\" $Id: tbl.7,v 1.15 2011/09/02 19:37:35 kristaps Exp $ +.\" $Id: tbl.7,v 1.16 2011/09/03 00:29:21 kristaps Exp $ .\" .\" Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: September 2 2011 $ +.Dd $Mdocdate: September 3 2011 $ .Dt TBL 7 .Os .Sh NAME @@ -256,12 +256,21 @@ The following case-insensitive modifier keys are available: .Cm e , .Cm t , .Cm d , -.Cm f , .Cm b , .Cm i , -.Cm b , +.Cm r , and -.Cm i . +.Cm f +.Po +followed by +.Cm b , +.Cm i , +.Cm r , +.Cm 3 , +.Cm 2 , +or +.Cm 1 +.Pc . All of these are ignored by .Xr mandoc 1 . .Pp diff --git a/tbl_layout.c b/tbl_layout.c index 0aa18dcb..8e033670 100644 --- a/tbl_layout.c +++ b/tbl_layout.c @@ -1,4 +1,4 @@ -/* $Id: tbl_layout.c,v 1.20 2011/05/17 13:11:40 kristaps Exp $ */ +/* $Id: tbl_layout.c,v 1.21 2011/09/03 00:29:21 kristaps Exp $ */ /* * Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -173,6 +173,8 @@ mod: goto mod; case ('f'): break; + case ('r'): + /* FALLTHROUGH */ case ('b'): /* FALLTHROUGH */ case ('i'): @@ -185,12 +187,20 @@ mod: } switch (tolower((unsigned char)p[(*pos)++])) { + case ('3'): + /* FALLTHROUGH */ case ('b'): cp->flags |= TBL_CELL_BOLD; goto mod; + case ('2'): + /* FALLTHROUGH */ case ('i'): cp->flags |= TBL_CELL_ITALIC; goto mod; + case ('1'): + /* FALLTHROUGH */ + case ('r'): + goto mod; default: break; } |