diff options
author | Wayne Davison <wayne@opencoder.net> | 2020-06-18 22:52:47 -0700 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2020-06-18 22:58:11 -0700 |
commit | e08f60037830ebad2ca1fefc12c4819d6499012d (patch) | |
tree | 6a421c44304d1e34bacfeb225ca971c09981ea71 /md2man | |
parent | e406845542b30db35b391fdd07c386e09ec224e2 (diff) | |
download | rsync-e08f60037830ebad2ca1fefc12c4819d6499012d.tar.gz |
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.
Diffstat (limited to 'md2man')
-rwxr-xr-x | md2man | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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): |