Set proper initial source name in parsing BibTeX.
(For better error messages.)
This commit is contained in:
1 parent
7ac8fcbcac
commit
4262898fe9
1 file changed
+3
-1
@@ -71,9 +71,11 @@ readBibtexString variant locale idpred contents = do
|
||||
filter (\item -> idpred (identifier item) &&
|
||||
entryType item /= "xdata"))
|
||||
(fromMaybe defaultLang $ localeLanguage locale, Map.empty)
|
||||
"" (toSources contents) of
|
||||
(initialSourceName sources) sources of
|
||||
Left err -> Left err
|
||||
Right xs -> return xs
|
||||
where
|
||||
sources = toSources contents
|
||||
|
||||
-- | Write BibTeX or BibLaTeX given given a 'Reference'.
|
||||
writeBibtexString :: WriterOptions -- ^ options (for writing LaTex)
|
||||
|
||||
Reference in new issue
Block a user