From aec54899606bed2580394baa1369e58ede20fde8 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 6 Feb 2011 09:38:44 -0800 Subject: Use us-ascii charset in HTML template if --ascii option. --- src/Text/Pandoc/Writers/HTML.hs | 1 + templates/html.template | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index f9a10f355..97c5dabea 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -178,6 +178,7 @@ inTemplate opts tit auths date toc body' newvars = (case toc of Just t -> [ ("toc", showHtmlFragment t)] Nothing -> []) ++ + [ ("ascii","true") | writerAscii opts ] ++ [ ("author", a) | a <- authors ] in renderTemplate context $ writerTemplate opts diff --git a/templates/html.template b/templates/html.template index 3f8b76fed..3f0e41679 100644 --- a/templates/html.template +++ b/templates/html.template @@ -7,9 +7,17 @@ $else$ $endif$ $if(html5)$ +$if(ascii)$ + +$else$ +$endif$ +$else$ +$if(ascii)$ + $else$ +$endif$ $endif$ $for(author)$ -- cgit v1.2.3