summaryrefslogtreecommitdiff
path: root/md2man
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2020-06-18 22:52:47 -0700
committerWayne Davison <wayne@opencoder.net>2020-06-18 22:58:11 -0700
commite08f60037830ebad2ca1fefc12c4819d6499012d (patch)
tree6a421c44304d1e34bacfeb225ca971c09981ea71 /md2man
parente406845542b30db35b391fdd07c386e09ec224e2 (diff)
downloadrsync-e08f60037830ebad2ca1fefc12c4819d6499012d.tar.gz
Use `-&#8288;` instead of `&#8209;`
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-xmd2man4
1 files changed, 2 insertions, 2 deletions
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&#8209;',
+ return re.sub(r'(^|\W)-', r'\1-&#8288;',
txt.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')
- .replace('--', '&#8209;&#8209;').replace("\xa0-", '&nbsp;&#8209;').replace("\xa0", '&nbsp;'))
+ .replace("\xa0", '&nbsp;').replace('--', '\4\4')).replace('\4', '-&#8288;')
def warn(*msg):