Menu

#65 Bug: tilde in "\~" is parsed as space

open
nobody
None
trunk
2015-05-02
2015-05-02
No

There seems to be a bug in pybtex/bibtex/utils.py in split_tex_string(), where a name such as 'Brand\~{a}o' gets incorrectly split because of the ~ character. Here, the ~ is part of the escape sequence \~ and is not a space.

I'm using pybtex to parse bibtex files (and it's really useful, thanks!). Here's an example of erroneous behavior:

>>> from pybtex.database import Person
>>> Person('Brand\~ao, F')
Person(u'Brand\\ ao, F')

I'm proposing a patch which fixes this (attached).

1 Attachments

Discussion

MongoDB Logo MongoDB