non-capturing parentheses for diacritics variants
authorJan Szejko <j-sz@o2.pl>
Thu, 4 Feb 2016 11:43:14 +0000 (12:43 +0100)
committerJan Szejko <j-sz@o2.pl>
Thu, 4 Feb 2016 11:43:14 +0000 (12:43 +0100)
src/catalogue/views.py

index 09f48c7..50dde9f 100644 (file)
@@ -321,7 +321,7 @@ def _no_diacritics_regexp(query):
 
     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)