Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@string not accepting hypen #147

Closed
dotnwat opened this issue Oct 20, 2016 · 1 comment
Closed

@string not accepting hypen #147

dotnwat opened this issue Oct 20, 2016 · 1 comment

Comments

@dotnwat
Copy link
Contributor

dotnwat commented Oct 20, 2016

I'm trying to parse the following bibtex file, which is accepted by at least the BibDesk manager and the standard bibtex tool:

@string{pub-ieee-std = {IEEE}}

but is rejected by python-bibtexparser with the following error:

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    bib_database = bibtexparser.load(bibtex_file, parser)
  File "/Users/nwatkins/src/bibthing/env/lib/python2.7/site-packages/bibtexparser/__init__.py", line 69, in load
    return parser.parse_file(bibtex_file)
  File "/Users/nwatkins/src/bibthing/env/lib/python2.7/site-packages/bibtexparser/bparser.py", line 148, in parse_file
    return self.parse(file.read(), partial=partial)
  File "/Users/nwatkins/src/bibthing/env/lib/python2.7/site-packages/bibtexparser/bparser.py", line 134, in parse
    raise exc
pyparsing.ParseException: Expected end of text (at char 0), (line:1, col:1)
@dotnwat
Copy link
Contributor Author

dotnwat commented Oct 20, 2016

This and another issue are fixed in #148

@omangin omangin closed this as completed Apr 14, 2017
omangin added a commit that referenced this issue Mar 31, 2018
Fixes #147. Accept string macros with hyphen and colon as well as fields with periods.

Ex:
@string{pub-ieee-std = {IEEE}}
@string{pub-ieee-std:adr = {New York, NY, USA}}

Dc.Date = {2004-01},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants