diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-06-30 00:00:15 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-06-30 00:01:47 +1200 |
commit | d8b540a2bc9571d5289deca158213fd644ead37e (patch) | |
tree | 81b566df1308174b776676e989ea1a27d5a85249 | |
parent | Adjust a couple more muttrc linebreaks (diff) | |
download | dotfiles-d8b540a2bc9571d5289deca158213fd644ead37e.tar.gz dotfiles-d8b540a2bc9571d5289deca158213fd644ead37e.zip |
Filter pandoc dashes in Mutt alternative parts
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™.
-rw-r--r-- | mutt/filters/markdown-to-html.sh | 3 |
1 files changed, 2 insertions, 1 deletions
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}' |