git.iko.soy/typeable/pandoc
on master help sign in
Use us-ascii charset in HTML template if --ascii option.
commitaec54899606bed2580394baa1369e58ede20fde8 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 6 Feb 2011, 09:38 (16 years ago) parent8f408e4
2 files changed+9
src/Text/Pandoc/Writers/HTML.hs+1 templates/html.template+8
src/Text/Pandoc/Writers/HTML.hs+1
@@ -178,6 +178,7 @@ inTemplate opts tit auths date toc body' newvars =
178178 (case toc of
179179 Just t -> [ ("toc", showHtmlFragment t)]
180180 Nothing -> []) ++
181+ [ ("ascii","true") | writerAscii opts ] ++
181182 [ ("author", a) | a <- authors ]
182183 in renderTemplate context $ writerTemplate opts
183184
templates/html.template+8
@@ -7,9 +7,17 @@ $else$
77$endif$
88<head>
99$if(html5)$
10+$if(ascii)$
11+ <meta charset="us-ascii" />
12+$else$
1013 <meta charset="utf-8" />
14+$endif$
15+$else$
16+$if(ascii)$
17+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
1118$else$
1219 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
20+$endif$
1321$endif$
1422 <meta name="generator" content="pandoc" />
1523$for(author)$