X-Git-Url: https://git.madduck.net/etc/mutt.git/blobdiff_plain/f5b4c8ddb39f52d01a3880410417f8439aa5223f..d7764d3d5c38f3697b1fb6252653982329d13310:/.config/mutt/markdown2html?ds=sidebyside diff --git a/.config/mutt/markdown2html b/.config/mutt/markdown2html index 309c22e..e1ce9af 100755 --- a/.config/mutt/markdown2html +++ b/.config/mutt/markdown2html @@ -135,8 +135,7 @@ def _preprocess_markdown(mdwn): # when used around email addresses. Note that this needs a postprocessing # hack because the pandoc autolink converted includes the ambersand # (https://github.com/jgm/pandoc/issues/7398). - ret = re.sub(r'<([^@]+@.+\.[^>]+)>', r'<\g<1> -PANDOC_BUG_7398->', ret) - + ret = re.sub(r'<([^@]+@\S+)>', r'<\g<1> PANDOC_BUG_7398 >', ret) return ret @@ -284,7 +283,7 @@ def _postprocess_html(html): # Preprocessing leaves a sentinel to work around # https://github.com/jgm/pandoc/issues/7398, and so we need to remove it: - html = html.replace(' -PANDOC_BUG_7398->', '>') + html = html.replace(' PANDOC_BUG_7398 ', '') return html