Fix --self-contained so it works when output format has extensions.
Previously if you used `--self-contained` with `html-smart` or `html+smart`, it wouldn't work.
This commit is contained in:
parent
d88a601642
commit
66dd2008b0
1 changed files with 4 additions and 4 deletions
|
@ -241,13 +241,13 @@ convertWithOpts opts = do
|
|||
"all" -> id
|
||||
"none" -> (filterIpynbOutput Nothing :)
|
||||
"best" -> (filterIpynbOutput (Just $
|
||||
if htmlFormat writerName
|
||||
if htmlFormat format
|
||||
then Format "html"
|
||||
else
|
||||
case writerName of
|
||||
case format of
|
||||
"latex" -> Format "latex"
|
||||
"beamer" -> Format "latex"
|
||||
_ -> Format writerName) :)
|
||||
_ -> Format format) :)
|
||||
_ -> id) -- should not happen
|
||||
$ []
|
||||
|
||||
|
@ -299,7 +299,7 @@ convertWithOpts opts = do
|
|||
else (<> T.singleton '\n')
|
||||
output <- addNl <$> f writerOptions doc
|
||||
writerFn eol outputFile =<<
|
||||
if optSelfContained opts && htmlFormat writerName
|
||||
if optSelfContained opts && htmlFormat format
|
||||
-- TODO not maximally efficient; change type
|
||||
-- of makeSelfContained so it works w/ Text
|
||||
then T.pack <$> makeSelfContained (T.unpack output)
|
||||
|
|
Loading…
Add table
Reference in a new issue