We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 649c814 commit 12be72eCopy full SHA for 12be72e
webstruct/utils.py
@@ -193,7 +193,7 @@ def _find_matches(self, tokens):
193
i = 0
194
while i < len(tokens):
195
max_length = min(self.max_length, max(len(tokens)-i, 0))
196
- for length in reversed(range(1, max_length+1)):
+ for length in xrange(max_length, 0, -1):
197
lookup = " ".join(tokens[i:i+length])
198
if lookup in self.known:
199
res.append((i, length+i, lookup))
0 commit comments