From d8b540a2bc9571d5289deca158213fd644ead37e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 30 Jun 2020 00:00:15 +1200 Subject: Filter pandoc dashes in Mutt alternative parts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If there are two consecutive em- or en-dashes on a line, change all the en dashes back to -- and the em dashes back to ---, so that we don't hack up e.g. "----- Forwarded message -----" in silly ways. This is gross, and firmly suggests I need to learn enough Lua to make Pandoc do this the way I actually want with a custom filter, but It'll Do For Now™. --- mutt/filters/markdown-to-html.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mutt') diff --git a/mutt/filters/markdown-to-html.sh b/mutt/filters/markdown-to-html.sh index cdba8ace..5fe28560 100644 --- a/mutt/filters/markdown-to-html.sh +++ b/mutt/filters/markdown-to-html.sh @@ -4,4 +4,5 @@ pandoc \ --from markdown_strict+smart \ --metadata=pagetitle:HTML \ --standalone \ - --to html4 + --to html4 | +sed '/[—–][—–]/{s/—/---/g;s/–/--/g}' -- cgit v1.2.3