@@ -71,9 +71,11 @@ readBibtexString variant locale idpred contents = do
7171 filter (\item -> idpred (identifier item) &&
7272 entryType item /= "xdata"))
7373 (fromMaybe defaultLang $ localeLanguage locale, Map.empty)
74− "" (toSources contents) of
74+ (initialSourceName sources) sources of
7575 Left err -> Left err
7676 Right xs -> return xs
77+ where
78+ sources = toSources contents
7779
7880-- | Write BibTeX or BibLaTeX given given a 'Reference'.
7981writeBibtexString :: WriterOptions -- ^ options (for writing LaTex)