Sat, 22 Jun 2013 15:36:46 +0200
Small corrections to the regexp wizards.
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py Fri Jun 21 19:28:37 2013 +0200 +++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py Sat Jun 22 15:36:46 2013 +0200 @@ -299,7 +299,9 @@ self.__formatCharacter(index, char2)) if regexp: - if len(regexp) == 2 and regexp in self.predefinedClasses: + if (len(regexp) == 2 and \ + (regexp in self.predefinedClasses or regexp in self.specialChars)) or \ + len(regexp) == 1: return regexp else: return "[{0}]".format(regexp)
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py Fri Jun 21 19:28:37 2013 +0200 +++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py Sat Jun 22 15:36:46 2013 +0200 @@ -638,7 +638,10 @@ self.__formatCharacter(char2, format)) if regexp: - if regexp.startswith("\\") and regexp.count("\\") == 1 and "-" not in regexp: + if (regexp.startswith("\\") and \ + regexp.count("\\") == 1 and \ + "-" not in regexp) or \ + len(regexp) == 1: return regexp else: return "[{0}]".format(regexp)