|
@ -19,8 +19,8 @@ from patacrep.plastex import simpleparse |
|
|
EOL = u"\n" |
|
|
EOL = u"\n" |
|
|
|
|
|
|
|
|
# Pattern set to ignore latex command in title prefix |
|
|
# Pattern set to ignore latex command in title prefix |
|
|
KEYWORD_PATTERN = re.compile(r"^%(\w+)\s?(.*)$") |
|
|
KEYWORD_PATTERN = re.compile(r"^%(\w+)\s?(.*)$", re.LOCALE) |
|
|
FIRST_LETTER_PATTERN = re.compile(r"^(?:\{?\\\w+\}?)*[^\w]*(\w)") |
|
|
FIRST_LETTER_PATTERN = re.compile(r"^(?:\{?\\\w+\}?)*[^\w]*(\w)", re.LOCALE) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def sortkey(value): |
|
|
def sortkey(value): |
|
@ -98,7 +98,8 @@ class Index(object): |
|
|
if 'prefix' in self.keywords: |
|
|
if 'prefix' in self.keywords: |
|
|
for prefix in self.keywords['prefix']: |
|
|
for prefix in self.keywords['prefix']: |
|
|
self.prefix_patterns.append(re.compile( |
|
|
self.prefix_patterns.append(re.compile( |
|
|
r"^({prefix})(\b|\\)(\s*.*)$".format(prefix=prefix) |
|
|
r"^({prefix})(\b|\\)(\s*.*)$".format(prefix=prefix), |
|
|
|
|
|
re.LOCALE |
|
|
)) |
|
|
)) |
|
|
|
|
|
|
|
|
if self.indextype == "AUTHOR": |
|
|
if self.indextype == "AUTHOR": |
|
|