Skip to content

Commit

Permalink
Fix shortcuts for 10+ messages
Browse files Browse the repository at this point in the history
Yes, it uses a regex, but I think it's the simplest way
  • Loading branch information
csnardi committed Jan 1, 2016
1 parent 62dbd8c commit efa1ceb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def preprocess_shortcut_command(cmd):
if not curr[0].isdigit():
new_cmd.append(curr)
else:
t = int(curr[0])
match = regex.search(r"^\d+", curr)
t = int(match.group())
for j in range(0, t):
new_cmd.append(curr[1:])
new_cmd.append(curr[match.end():])
return " ".join(new_cmd)

0 comments on commit efa1ceb

Please sign in to comment.