Skip to content

Commit 71578d6

Browse files
did not sort things right
cause bad matching (sorted alphabetically, not by length)
1 parent 3263710 commit 71578d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json_runner/string_parsing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def tokenize(string, atoms):
161161
fr"(?&start){regex.escape(a)}(?&end)"
162162
if a[0].isalpha() and a[-1].isalpha()
163163
else regex.escape(a)
164-
for a in sorted(atoms, reverse=True)
164+
for a in sorted(atoms, key=len, reverse=True)
165165
)
166166
if ATOM_REGEX:
167167
ATOM_REGEX = "| (?:%s)" % ATOM_REGEX

0 commit comments

Comments
 (0)