fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9fc17f1
)
non-capturing parentheses for diacritics variants
author
Jan Szejko
<j-sz@o2.pl>
Thu, 4 Feb 2016 11:43:14 +0000
(12:43 +0100)
committer
Jan Szejko
<j-sz@o2.pl>
Thu, 4 Feb 2016 11:43:14 +0000
(12:43 +0100)
src/catalogue/views.py
patch
|
blob
|
history
diff --git
a/src/catalogue/views.py
b/src/catalogue/views.py
index
09f48c7
..
50dde9f
100644
(file)
--- a/
src/catalogue/views.py
+++ b/
src/catalogue/views.py
@@
-321,7
+321,7
@@
def _no_diacritics_regexp(query):
def repl(m):
l = m.group()
def repl(m):
l = m.group()
- return u"(%s)" % '|'.join(names[l])
+ return u"(
?:
%s)" % '|'.join(names[l])
return re.sub(u'[%s]' % (u''.join(names.keys())), repl, query)
return re.sub(u'[%s]' % (u''.join(names.keys())), repl, query)