Skip to content

Commit 8b17891

Browse files
authored
Make sure to properly end quoted strings (#339)
Follow up on PR #321 and Issue #319
1 parent 71eabf6 commit 8b17891

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

twitchio/ext/commands/stringparser.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ def process_string(self, msg: str) -> Dict[int, str]:
5454
self.index += 1
5555
self.start = self.count + 1
5656

57-
elif loc == '"' and self.start == self.count: # only tokenize if they're a new word
57+
elif loc == '"':
5858
if not self.ignore:
59-
self.start = self.count + 1
60-
self.ignore = True
59+
if self.start == self.count: # only tokenize if they're a new word
60+
self.start = self.count + 1
61+
self.ignore = True
6162
else:
6263
self.words[self.index] = msg[self.start : self.count]
6364
self.index += 1

0 commit comments

Comments
 (0)