From: Vincent Le Gallic Date: Thu, 14 Nov 2013 00:33:41 +0000 (+0100) Subject: [self_improvement] Using .lower() on avant and apres when case_insensitive X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=4c600255d74b7e058ffa4d0c729c7e495e61b484;p=bots%2Fbasile.git [self_improvement] Using .lower() on avant and apres when case_insensitive --- diff --git a/basile.py b/basile.py index 63f8d1c..2fedf6e 100755 --- a/basile.py +++ b/basile.py @@ -76,6 +76,8 @@ def is_something(chain, regexp=None, matches=[], avant=u".*(?:^| )", apres=u"(?: Si ``regexp`` est fournie, c'est simplement elle qui est testée""" if not case_sensitive: chain = chain.lower() + apres = apres.lower() + avant = avant.lower() if regexp == None: regexp = regex_join(matches, avant, apres) regexp = re.compile(regexp)