source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: For selecting a two-digit font size, support the historic syntax
@ 2015-02-20 23:55 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-02-20 23:55 UTC (permalink / raw)
  To: source

Log Message:
-----------
For selecting a two-digit font size, support the historic syntax \s12
in addition to the classic syntax \s(12, the modern syntax \s[12],
and the alternative syntax \s'12'.  The historic syntax only works
for the font sizes 10-39.
Real-world usage found by naddy@ in plan9/rc.

Modified Files:
--------------
    mdocml:
        mandoc.c

Revision Data
-------------
Index: mandoc.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mandoc.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -Lmandoc.c -Lmandoc.c -u -p -r1.91 -r1.92
--- mandoc.c
+++ mandoc.c
@@ -242,6 +242,14 @@ mandoc_escape(const char **end, const ch
 			*start = ++*end;
 			term = '\'';
 			break;
+		case '3':
+			/* FALLTHROUGH */
+		case '2':
+			/* FALLTHROUGH */
+		case '1':
+			*sz = (*end)[-1] == 's' &&
+			    isdigit((unsigned char)(*end)[1]) ? 2 : 1;
+			break;
 		default:
 			*sz = 1;
 			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:[~2015-02-20 23:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20 23:55 mdocml: For selecting a two-digit font size, support the historic syntax schwarze

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).