diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-20 23:55:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-20 23:55:10 +0000 |
commit | c61dac4b4477899e79fcb43ff7ac3ae460c8a724 (patch) | |
tree | 7e72e2022d898a0955a70caa916d802ccf261674 /mandoc.c | |
parent | b6009097ae3ad6c24b2fbc8e50140a6bbb5986cd (diff) | |
download | mandoc-c61dac4b4477899e79fcb43ff7ac3ae460c8a724.tar.gz |
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.
Diffstat (limited to 'mandoc.c')
-rw-r--r-- | mandoc.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -242,6 +242,14 @@ mandoc_escape(const char **end, const char **start, int *sz) *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; |