Skip to content

Commit

Permalink
Merge pull request #106 from Dinh-Hung-Tu/#102
Browse files Browse the repository at this point in the history
#102 Fix re.match to re.search in weights
  • Loading branch information
kirsle authored Sep 21, 2017
2 parents 8cf5a64 + 095f611 commit 49b08dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rivescript/brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def _getreply(self, user, msg, context='normal', step=0, ignore_object_errors=Tr
bucket = []
for text in matched["reply"]:
weight = 1
match = re.match(RE.weight, text)
match = re.search(RE.weight, text)
if match:
weight = int(match.group(1))
if weight <= 0:
Expand Down

0 comments on commit 49b08dd

Please sign in to comment.