Correctly recognize book documentclass in metadata.
Closes #2395.
commitda1b599c963a6b7fc5e7d61ca18979955a9ad2ae
authorJohn MacFarlane <jgm@berkeley.edu>
dateFri 25 Sep 2015, 23:28 (11 years ago)
parentdcb0b02
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -120,7 +120,7 @@ pandocToLaTeX options (Pandoc meta blocks) = do
120120 Right r -> r
121121 Left _ -> ""
122122 case lookup "documentclass" (writerVariables options) `mplus`
123− parseMaybe (withObject "object" (.: "documentclass")) metadata of
123+ fmap stringify (lookupMeta "documentclass" meta) of
124124 Just x | x `elem` bookClasses -> modify $ \s -> s{stBook = True}
125125 | otherwise -> return ()
126126 Nothing | documentClass `elem` bookClasses