mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1702914 [error trying to create .bib catalog](https://bugs.launchpad.net/calibre/+bug/1702914)
This commit is contained in:
parent
90cfbc5229
commit
42543e57ec
@ -65,7 +65,6 @@ __docformat__ = 'restructuredtext en'
|
|||||||
|
|
||||||
import re, string
|
import re, string
|
||||||
|
|
||||||
from calibre.constants import preferred_encoding
|
|
||||||
from calibre.utils.mreplace import MReplace
|
from calibre.utils.mreplace import MReplace
|
||||||
|
|
||||||
utf8enc2latex_mapping = {
|
utf8enc2latex_mapping = {
|
||||||
@ -2855,7 +2854,7 @@ class BibTeX:
|
|||||||
# http://bibdesk.sourceforge.net/manual/BibDesk%20Help_2.html
|
# http://bibdesk.sourceforge.net/manual/BibDesk%20Help_2.html
|
||||||
self.invalid_cit = re.compile(u'[ "@\',\\#}{~%&$^]')
|
self.invalid_cit = re.compile(u'[ "@\',\\#}{~%&$^]')
|
||||||
self.upper = re.compile(u'[' +
|
self.upper = re.compile(u'[' +
|
||||||
string.uppercase.decode(preferred_encoding) + u']')
|
string.ascii_uppercase + u']')
|
||||||
self.escape = re.compile(u'[~#&%_]')
|
self.escape = re.compile(u'[~#&%_]')
|
||||||
|
|
||||||
def ValidateCitationKey(self, text):
|
def ValidateCitationKey(self, text):
|
||||||
@ -2929,4 +2928,3 @@ class BibTeX:
|
|||||||
text.pop(i)
|
text.pop(i)
|
||||||
text = ''.join(text)
|
text = ''.join(text)
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user