@@ -238,7 +238,11 @@ elementToBeamer slideLevel (Sec lvl _num _ident tit elts)
238 hasCodeBlock _ = []
238 hasCodeBlock _ = []
239 let hasCode (Code _ _) = [True]
239 let hasCode (Code _ _) = [True]
240 hasCode _ = []
240 hasCode _ = []
241+ opts <- gets stOptions
241− let fragile = if not $ null $ queryWith hasCodeBlock elts ++ queryWith hasCode elts
242+ let fragile = if not $ null $ queryWith hasCodeBlock elts ++
243+ if writerListings opts
244+ then queryWith hasCode elts
242 then "[fragile]"
246 then "[fragile]"
244 let slideStart = Para $ RawInline "latex" ("\\begin{frame}" ++ fragile) :
248 let slideStart = Para $ RawInline "latex" ("\\begin{frame}" ++ fragile) :