@@ -211,10 +211,6 @@ convertWithOpts opts = do
211 ("application/xml", jatsCSL)
211 ("application/xml", jatsCSL)
212 return $ ("csl", jatsEncoded) : optMetadata opts
212 return $ ("csl", jatsEncoded) : optMetadata opts
213 else return $ optMetadata opts
213 else return $ optMetadata opts
215− case optMetadataFile opts of
216− Nothing -> return mempty
217− Just file -> readFileLazy file >>= yamlToMeta
219 case lookup "lang" (optMetadata opts) of
215 case lookup "lang" (optMetadata opts) of
220 Just l -> case parseBCP47 l of
216 Just l -> case parseBCP47 l of
@@ -235,6 +231,11 @@ convertWithOpts opts = do
235 , readerStripComments = optStripComments opts
231 , readerStripComments = optStripComments opts
235+ case optMetadataFile opts of
236+ Nothing -> return mempty
237+ Just file -> readFileLazy file >>= yamlToMeta readerOpts
238 let transforms = (case optBaseHeaderLevel opts of
239 let transforms = (case optBaseHeaderLevel opts of
239 x | x > 1 -> (headerShift (x - 1) :)
240 x | x > 1 -> (headerShift (x - 1) :)
240 | otherwise -> id) .
241 | otherwise -> id) .