git.samba.org
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1369fe4
)
Fix multi-line code blocks.
author
Wayne Davison
<wayne@opencoder.net>
Thu, 23 Jul 2020 23:20:07 +0000
(16:20 -0700)
committer
Wayne Davison
<wayne@opencoder.net>
Thu, 23 Jul 2020 23:22:12 +0000
(16:22 -0700)
packaging/md2html
patch
|
blob
|
history
diff --git
a/packaging/md2html
b/packaging/md2html
index 0ee7c405d5ea7fb9a202245b0bc5ebf3bdfa5486..fa8d8b9600d16f86d4e102f8ef087b040a9cf786 100755
(executable)
--- a/
packaging/md2html
+++ b/
packaging/md2html
@@
-75,7
+75,7
@@
def main():
html = md_parser(txt)
- html = re.sub(r'(<code>)([\s\S]*?)(</code>)', lambda m: m[1] + re.sub(r'\s', '\xa0', m[2]) + m[3], html)
+ html = re.sub(r'(
?<!<pre>)(
<code>)([\s\S]*?)(</code>)', lambda m: m[1] + re.sub(r'\s', '\xa0', m[2]) + m[3], html)
html = html.replace('--', '‑‑').replace("\xa0-", ' ‑').replace("\xa0", ' ')
html = re.sub(r'(\W)-', r'\1‑', html)