Fix mistake in pattern raw flag

This commit is contained in:
Tulir Asokan 2019-06-23 12:03:56 +03:00
parent 98c3bfb252
commit 9a0f6da774

View file

@ -217,8 +217,8 @@ class ReactBot(Plugin):
raw = False
if isinstance(pattern, dict):
flags = self._get_flags(pattern.get("flags", ""))
pattern = pattern["pattern"]
raw = pattern.get("raw", False)
pattern = pattern["pattern"]
if not flags or flags == re.IGNORECASE:
ignorecase = flags == re.IGNORECASE
s_pattern = pattern.lower() if ignorecase else pattern