@@ -241,13 +241,13 @@ convertWithOpts opts = do
241241 "all" -> id
242242 "none" -> (filterIpynbOutput Nothing :)
243243 "best" -> (filterIpynbOutput (Just $
244− if htmlFormat writerName
244+ if htmlFormat format
245245 then Format "html"
246246 else
247− case writerName of
247+ case format of
248248 "latex" -> Format "latex"
249249 "beamer" -> Format "latex"
250− _ -> Format writerName) :)
250+ _ -> Format format) :)
251251 _ -> id) -- should not happen
252252 $ []
253253
@@ -299,7 +299,7 @@ convertWithOpts opts = do
299299 else (<> T.singleton '\n')
300300 output <- addNl <$> f writerOptions doc
301301 writerFn eol outputFile =<<
302− if optSelfContained opts && htmlFormat writerName
302+ if optSelfContained opts && htmlFormat format
303303 -- TODO not maximally efficient; change type
304304 -- of makeSelfContained so it works w/ Text
305305 then T.pack <$> makeSelfContained (T.unpack output)