From 63be372595c5ccdf1108543a075027eb070d484b Mon Sep 17 00:00:00 2001 From: Valery Ushakov Date: Tue, 5 Jan 2021 00:11:41 +0300 Subject: 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)). --- appl/lib/parseman.b | 4 ++-- 1 file 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) -- cgit v1.2.3