From: Jan Szejko Date: Thu, 4 Feb 2016 11:43:14 +0000 (+0100) Subject: non-capturing parentheses for diacritics variants X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/8ac06f56a164a1860e6c33ac7fd65167d9714cb1?hp=9fc17f14ed2cdf669ae931051513097c0378413a non-capturing parentheses for diacritics variants --- diff --git a/src/catalogue/views.py b/src/catalogue/views.py index 09f48c7d4..50dde9f5b 100644 --- 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() - return u"(%s)" % '|'.join(names[l]) + return u"(?:%s)" % '|'.join(names[l]) return re.sub(u'[%s]' % (u''.join(names.keys())), repl, query)