diff options
| author | 2019-12-27 13:50:12 +0000 | |
|---|---|---|
| committer | 2019-12-27 13:50:12 +0000 | |
| commit | f2eba715b4f8a67f1b7bf7f35d9f05264b36b37c (patch) | |
| tree | a54cbdb5908894f4171e522bf3918864f11f1737 /src | |
| parent | remove extraneous space in "MONITOR -" command (diff) | |
| signature | ||
`i` should shift righwards also when finding double sigil
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils/parse.py | 4 |
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))) |
