diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-09-25 23:28:38 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-09-25 23:28:38 -0700 |
commit | da1b599c963a6b7fc5e7d61ca18979955a9ad2ae (patch) | |
tree | 9d4786dc528b4316c6023192829ec807ece5edf4 /src/Text/Pandoc | |
parent | dcb0b02aa391135d34da2a9c76b0683c19b521b3 (diff) | |
download | pandoc-da1b599c963a6b7fc5e7d61ca18979955a9ad2ae.tar.gz |
Correctly recognize book documentclass in metadata.
Closes #2395.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 2 |
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 |