diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-11-03 15:11:17 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-11-03 15:11:17 -0800 |
commit | a6612b35c8852adb34e1e9a574f29a682122b0ff (patch) | |
tree | 9a96eda6b8b585a22304001a03f0ae9a390c19f2 | |
parent | f515f984d46c302a024bc0f191a2bc3ea57b1585 (diff) | |
download | pandoc-a6612b35c8852adb34e1e9a574f29a682122b0ff.tar.gz |
EPUB writer: ensure that `lang` variable is set on all chapters.
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index ef7ce659b..37c78bba8 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -434,9 +434,11 @@ pandocToEPUB version opts doc = do stylesheets [(1 :: Int)..] let vars = Context $ - M.delete "css" . M.insert "epub3" - (toVal' $ if epub3 then "true" else "false") $ - unContext $ writerVariables opts + M.delete "css" . + M.insert "epub3" + (toVal' $ if epub3 then "true" else "false") . + M.insert "lang" (toVal' $ epubLanguage metadata) + $ unContext $ writerVariables opts let cssvars useprefix = Context $ M.fromList $ map (\e -> ("css", toVal' $ |