summaryrefslogtreecommitdiffstats
path: root/out.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-07-18 23:06:18 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-07-18 23:06:18 +0000
commit80aa3d0c6da7cc73bc7d71bdf95762cc4142326c (patch)
tree5b0af1d55bd50de727dd1faa1655a301f1277e1d /out.c
parent142f3db069bd40d760a2926765c0e051b7789cdf (diff)
downloadmandoc-80aa3d0c6da7cc73bc7d71bdf95762cc4142326c.tar.gz
Properly discard \m colour escapes. Noted by J.C. Roberts.
Diffstat (limited to 'out.c')
-rw-r--r--out.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/out.c b/out.c
index d5520604..92b2c14a 100644
--- a/out.c
+++ b/out.c
@@ -233,6 +233,22 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
break;
}
break;
+ case ('M'):
+ /* FALLTHROUGH */
+ case ('m'):
+ switch (wp[i++]) {
+ case ('('):
+ lim = 2;
+ break;
+ case ('['):
+ term = ']';
+ break;
+ default:
+ i--;
+ lim = 1;
+ break;
+ }
+ break;
case ('s'):
if ('+' == wp[i] || '-' == wp[i])
i++;