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 7dafdfd commit 589cfc5Copy full SHA for 589cfc5
pyard/smart_sort.py
@@ -25,6 +25,7 @@
25
import re
26
27
expr_regex = re.compile('[NQLSGg]')
28
+glstring_chars = re.compile('[/|+^~]')
29
30
31
@functools.lru_cache(maxsize=1000)
@@ -43,6 +44,10 @@ def smart_sort_comparator(a1, a2):
43
44
if a1 == a2:
45
return 0
46
47
+ # Ignore GL String matches
48
+ if re.search(glstring_chars, a1) or re.search(glstring_chars, a2):
49
+ return 0
50
+
51
# remove any non-numerics
52
a1 = re.sub(expr_regex, '', a1)
53
a2 = re.sub(expr_regex, '', a2)
@@ -92,4 +97,3 @@ def smart_sort_comparator(a1, a2):
92
97
93
98
# All fields are considered equal after 4th field
94
99
95
-
0 commit comments