diff options
author | Valery Ushakov <uwe@stderr.spb.ru> | 2021-01-05 00:11:41 +0300 |
---|---|---|
committer | Valery Ushakov <uwe@stderr.spb.ru> | 2021-01-05 00:11:41 +0300 |
commit | 63be372595c5ccdf1108543a075027eb070d484b (patch) | |
tree | 3fc1190a1b07ce1268e7bf52c63beb25ac235fff | |
parent | a93f6c888f6d530420fbb54e2f7fa4572cdc5208 (diff) |
lib/parseman: recognize all troff space escapes
parsetext() recognizes escapes for \& zero-width space, and \| narrow
space (1/6 em-space in troff). Recognize also \^ - half-narrow space
(1/12 em) and ignore it (found e.g. in dd(1)), and \0 - digit-width
space and map it to plain space character (found e.g. in text(9)).
-rw-r--r-- | appl/lib/parseman.b | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/appl/lib/parseman.b b/appl/lib/parseman.b index bf420763..0f4151e9 100644 --- a/appl/lib/parseman.b +++ b/appl/lib/parseman.b @@ -443,11 +443,11 @@ parsetext[T](state: ref ParseState[T], t: string): list of Text case t[i] { '-' or '.' or '\\' => ch = t[i]; - ' ' => + ' ' or '0' => ch = ' '; 'e' => ch = '\\'; - '|' or '&' => + '|' or '&' or '^' => continue; '(' => if (width > 3) |