From: Wayne Davison Date: Fri, 19 Jun 2020 05:52:47 +0000 (-0700) Subject: Use `-⁠` instead of `‑` X-Git-Tag: v3.2.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e08f60037830ebad2ca1fefc12c4819d6499012d;p=thirdparty%2Frsync.git Use `-⁠` instead of `‑` Using a non-breaking zero-width char after a dash makes the browser avoiding breaking on that dash and also makes it match a dash in a search. This is better than a non-breaking dash char, which does not match a dash in a search. --- diff --git a/md2man b/md2man index f4f8ca4f..1b84162d 100755 --- a/md2man +++ b/md2man @@ -339,9 +339,9 @@ def manify(txt): def htmlify(txt): - return re.sub(r'(\W)-', r'\1‑', + return re.sub(r'(^|\W)-', r'\1-⁠', txt.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"') - .replace('--', '‑‑').replace("\xa0-", ' ‑').replace("\xa0", ' ')) + .replace("\xa0", ' ').replace('--', '\4\4')).replace('\4', '-⁠') def warn(*msg):