@@ -211,10 +211,6 @@ convertWithOpts opts = do
211211 ("application/xml", jatsCSL)
212212 return $ ("csl", jatsEncoded) : optMetadata opts
213213 else return $ optMetadata opts
214− metadataFromFile <-
215− case optMetadataFile opts of
216− Nothing -> return mempty
217− Just file -> readFileLazy file >>= yamlToMeta
218214
219215 case lookup "lang" (optMetadata opts) of
220216 Just l -> case parseBCP47 l of
@@ -235,6 +231,11 @@ convertWithOpts opts = do
235231 , readerStripComments = optStripComments opts
236232 }
237233
234+ metadataFromFile <-
235+ case optMetadataFile opts of
236+ Nothing -> return mempty
237+ Just file -> readFileLazy file >>= yamlToMeta readerOpts
238+
238239 let transforms = (case optBaseHeaderLevel opts of
239240 x | x > 1 -> (headerShift (x - 1) :)
240241 | otherwise -> id) .