summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-09-25 23:28:38 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-09-25 23:28:38 -0700
commitda1b599c963a6b7fc5e7d61ca18979955a9ad2ae (patch)
tree9d4786dc528b4316c6023192829ec807ece5edf4 /src
parentdcb0b02aa391135d34da2a9c76b0683c19b521b3 (diff)
Correctly recognize book documentclass in metadata.
Closes #2395.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 6a30efbf5..70324d1af 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -120,7 +120,7 @@ pandocToLaTeX options (Pandoc meta blocks) = do
Right r -> r
Left _ -> ""
case lookup "documentclass" (writerVariables options) `mplus`
- parseMaybe (withObject "object" (.: "documentclass")) metadata of
+ fmap stringify (lookupMeta "documentclass" meta) of
Just x | x `elem` bookClasses -> modify $ \s -> s{stBook = True}
| otherwise -> return ()
Nothing | documentClass `elem` bookClasses