aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit52f37ad3e3a4f0b73bd7004eb2d85958efabb3b0 (patch)
tree1bc506972e3f4fdf46e7f83653d92638a5d64bf5
parentecde8066e9fefa3134fec10222f61596f76ae94d (diff)
downloadmandoc-52f37ad3e3a4f0b73bd7004eb2d85958efabb3b0.tar.gz
mandoc-52f37ad3e3a4f0b73bd7004eb2d85958efabb3b0.tar.zst
mandoc-52f37ad3e3a4f0b73bd7004eb2d85958efabb3b0.zip
Properly discard \m colour escapes. Noted by J.C. Roberts.
-rw-r--r--TODO5
-rw-r--r--out.c18
2 files changed, 18 insertions, 5 deletions
diff --git a/TODO b/TODO
index 7f8f512f..00f74746 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,6 @@
************************************************************************
* Official mandoc TODO. May not be quite up to date.
-* $Id: TODO,v 1.29 2010/07/18 18:04:25 kristaps Exp $
+* $Id: TODO,v 1.30 2010/07/18 23:06:18 kristaps Exp $
************************************************************************
************************************************************************
@@ -68,9 +68,6 @@
- have a blank `It' head for `Bl -tag' not puke
-- ignore horrendous m[] font colouring
- reported by J.C. Roberts
-
- prohibit `Nm' from having non-text HEAD children
(e.g., NetBSD mDNSShared/dns-sd.1)
(mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified)
diff --git a/out.c b/out.c
index 423e22ce..9e50628a 100644
--- a/out.c
+++ b/out.c
@@ -1,4 +1,4 @@
-/* $Id: out.c,v 1.18 2010/07/18 22:55:06 kristaps Exp $ */
+/* $Id: out.c,v 1.19 2010/07/18 23:06:18 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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++;