diff --git a/GoodFrench/config.py b/GoodFrench/config.py index 0f72be3..5c32b77 100644 --- a/GoodFrench/config.py +++ b/GoodFrench/config.py @@ -57,9 +57,9 @@ conf.registerChannelValue(GoodFrench, 'level', 3 : filtre les fautes de conjugaison courantes ; 4 : filtre les fautes d'orthographe courantes ; 5 : filtre les abbréviations ("t'as" au lieu de "tu as") ; - 6 : filtre les 'lol' - 7 : filtre les erreurs de typographie (note : a tendance à avoir la - gachette facile)""")) + 6 : filtre les erreurs de typographie (note : a tendance à avoir la + gachette facile) + 7 : filtre les 'lol'""")) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: diff --git a/GoodFrench/plugin.py b/GoodFrench/plugin.py index f3aa65e..e405c93 100644 --- a/GoodFrench/plugin.py +++ b/GoodFrench/plugin.py @@ -64,11 +64,11 @@ class SpellChecker: self._checking = 'abbréviation' self.checkAbbreviation() if level >= 6: - self._checking = 'lol' - self.checkLol() - if level >= 7: self._checking = 'typographie' self.checkTypographic() + if level >= 7: + self._checking = 'lol' + self.checkLol() def _raise(self, message): self._errors.append('[%s] %s' % (self._checking, message)) @@ -77,12 +77,12 @@ class SpellChecker: if displayedMask is None: displayedMask = mask raise_ = False - text = self._text + text = re.sub('[a-zA-Z0-9]+://[^ ]+', '', self._text) nickRemover = re.match('[^ ]*: (?P.*)', text) if nickRemover is not None: text = nickRemover.group('text') text = '%s%s%s' % (wizard, text, wizard) - AntislashDoubleYou = '[^a-zA-Z0-9éèàùâêûôîäëüïö\']' + AntislashDoubleYou = '[^a-zA-Z0-9éèàùâêûôîäëüïöç’\']' if mode == 'single' and re.match('.*%s%s%s.*' % (AntislashDoubleYou, mask, AntislashDoubleYou), @@ -97,12 +97,12 @@ class SpellChecker: self._raise(correct) else: if correct.__class__ == list: - correct = '« %s »' % '» , ou «'.join(correct) + correct = '« %s »' % ' » , ou « '.join(correct) else: correct = '« %s »' % correct if displayedMask.__class__ == list: - displayedMask = '« %s »' % '» ou «'.join(displayedMask) + displayedMask = '« %s »' % ' » ou « '.join(displayedMask) else: displayedMask = '« %s »' % displayedMask self._raise('On ne dit pas %s mais %s' %