summaryrefslogtreecommitdiff
path: root/md2man
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2020-06-14 18:28:30 -0700
committerWayne Davison <wayne@opencoder.net>2020-06-14 18:28:30 -0700
commit660274bfb7e7da5fa94e4594aba74d4d98fb8d9e (patch)
tree92913106c42df4b193a8cd3179568fe0a9415d5b /md2man
parent59cf9ff7975601d274f6b8e7a5338d41aca1416f (diff)
downloadrsync-660274bfb7e7da5fa94e4594aba74d4d98fb8d9e.tar.gz
A few more md -> html improvements
Diffstat (limited to 'md2man')
-rwxr-xr-xmd2man4
1 files changed, 3 insertions, 1 deletions
diff --git a/md2man b/md2man
index 8736dd1c..7ee63f53 100755
--- a/md2man
+++ b/md2man
@@ -334,7 +334,9 @@ def manify(txt):
def htmlify(txt):
- return txt.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;').replace("\xa0", '&nbsp;')
+ return re.sub(r'(\W)-', r'\1&#8209;',
+ txt.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')
+ .replace('--', '&#8209;&#8209;').replace("\xa0-", '&nbsp;&#8209;').replace("\xa0", '&nbsp;'))
def warn(*msg):