Don't read jats.csl unless we actually need it.
This commit is contained in:
parent
6ad486c3c3
commit
8d50f37d53
1 changed files with 6 additions and 5 deletions
|
@ -386,11 +386,12 @@ convertWithOpts opts = do
|
||||||
withMediaBag . r readerOpts) sources
|
withMediaBag . r readerOpts) sources
|
||||||
return (mconcat (map fst pairs), mconcat (map snd pairs))
|
return (mconcat (map fst pairs), mconcat (map snd pairs))
|
||||||
|
|
||||||
jatsCSL <- readDataFile datadir "jats.csl"
|
metadata <- if format == "jats"
|
||||||
let jatsEncoded = makeDataURI ("application/xml", jatsCSL)
|
then do
|
||||||
let metadata = if format == "jats"
|
jatsCSL <- readDataFile datadir "jats.csl"
|
||||||
then ("csl", jatsEncoded) : optMetadata opts
|
let jatsEncoded = makeDataURI ("application/xml", jatsCSL)
|
||||||
else optMetadata opts
|
return $ ("csl", jatsEncoded) : optMetadata opts
|
||||||
|
else return $ optMetadata opts
|
||||||
|
|
||||||
runIO' $ do
|
runIO' $ do
|
||||||
(doc, media) <- sourceToDoc sources
|
(doc, media) <- sourceToDoc sources
|
||||||
|
|
Loading…
Reference in a new issue