X-Git-Url: https://git.madduck.net/etc/mutt.git/blobdiff_plain/6ebf19acd375963b83cfc7577440c17eda803548..df7778d191c99b4abf5eb6670d3686e1b7a5b1b8:/.mutt/markdown2html?ds=sidebyside diff --git a/.mutt/markdown2html b/.mutt/markdown2html index 35b4ea2..4bb1a9d 100755 --- a/.mutt/markdown2html +++ b/.mutt/markdown2html @@ -107,7 +107,6 @@ HTML_DOCUMENT = ''' -HTML E-Mail {htmlbody} ''' @@ -215,7 +214,7 @@ def _reformat_quotes(html): def _convert_with_pandoc(mdwn, inputfmt='markdown', outputfmt='html5', ext_enabled=None, ext_disabled=None, - standalone=True, title="HTML E-Mail"): + standalone=True, selfcontained=True, title="HTML E-Mail"): ''' Invoke pandoc to do the actual conversion of Markdown to HTML5. ''' @@ -258,6 +257,8 @@ def _convert_with_pandoc(mdwn, inputfmt='markdown', outputfmt='html5', args = [] if standalone: args.append('--standalone') + if selfcontained: + args.append('--self-contained') if title: args.append(f'--metadata=pagetitle:"{title}"') @@ -295,7 +296,7 @@ def convert_markdown_to_html(mdwn): if body: body = _preprocess_markdown(body) body = _identify_quotes_for_later(body) - html = _convert_with_pandoc(body, standalone=False) + html = _convert_with_pandoc(body, standalone=True, selfcontained=True) html = _reformat_quotes(html) if sig: