aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-05-13 20:10:54 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-05-13 20:10:54 -0700
commit75cfa7b4624bfbf06c8a47761620bd756ddab254 (patch)
tree1b6a7effa61dc58de01a3c9034de83b70a5e0a80 /src/Text/Pandoc
parent1f358cc524e9982084a4992c9d9ac5fdd7db6811 (diff)
downloadpandoc-75cfa7b4624bfbf06c8a47761620bd756ddab254.tar.gz
Beamer: mark slide as `[fragile]` if header has `fragile` class.
Closes #2119.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 70280aaec..a785e1edc 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -274,10 +274,11 @@ elementToBeamer slideLevel (Sec lvl _num (ident,classes,kvs) tit elts)
let hasCode (Code _ _) = [True]
hasCode _ = []
opts <- gets stOptions
- let fragile = not $ null $ query hasCodeBlock elts ++
+ let fragile = "fragile" `elem` classes ||
+ not (null $ query hasCodeBlock elts ++
if writerListings opts
then query hasCode elts
- else []
+ else [])
let allowframebreaks = "allowframebreaks" `elem` classes
let optionslist = ["fragile" | fragile] ++
["allowframebreaks" | allowframebreaks]