* mdocml: Fix handling of font modifiers in tables.
@ 2011-09-03 0:29 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-09-03 0:29 UTC (permalink / raw)
To: source
Log Message:
-----------
Fix handling of font modifiers in tables. Noted by Brad Smith.
Modified Files:
--------------
mdocml:
tbl.7
tbl_layout.c
Revision Data
-------------
Index: tbl.7
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tbl.7,v
retrieving revision 1.15
retrieving revision 1.16
diff -Ltbl.7 -Ltbl.7 -u -p -r1.15 -r1.16
--- tbl.7
+++ tbl.7
@@ -256,12 +256,21 @@ The following case-insensitive modifier
.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
Index: tbl_layout.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tbl_layout.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -Ltbl_layout.c -Ltbl_layout.c -u -p -r1.20 -r1.21
--- tbl_layout.c
+++ tbl_layout.c
@@ -173,6 +173,8 @@ mod:
goto mod;
case ('f'):
break;
+ case ('r'):
+ /* FALLTHROUGH */
case ('b'):
/* FALLTHROUGH */
case ('i'):
@@ -185,11 +187,19 @@ 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;
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-03 0:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-03 0:29 mdocml: Fix handling of font modifiers in tables kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).