aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar jesopo2019-12-27 13:50:12 +0000
committerGravatar jesopo2019-12-27 13:50:12 +0000
commitf2eba715b4f8a67f1b7bf7f35d9f05264b36b37c (patch)
treea54cbdb5908894f4171e522bf3918864f11f1737 /src/utils
parentremove extraneous space in "MONITOR -" command (diff)
signature
`i` should shift righwards also when finding double sigil
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/parse.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/parse.py b/src/utils/parse.py
index d1b66cf3..2680df48 100644
--- a/src/utils/parse.py
+++ b/src/utils/parse.py
@@ -129,8 +129,8 @@ def format_tokens(s: str, names: typing.List[str], sigil: str="$"
while i < max:
if s[i] == sigil:
- if not s[i+1] == sigil:
- i += 1
+ i += 1
+ if not s[i] == sigil:
for name in names:
if len(name) <= (len(s)-i) and s[i:i+len(name)] == name:
tokens.append((i-1, "%s%s" % (sigil, name)))