Fixed an issue in the Pygments package sorting lexers by relevance. 5_3_x

Thu, 18 Apr 2013 19:09:20 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 18 Apr 2013 19:09:20 +0200
branch
5_3_x
changeset 2592
0b5d3a8bc68b
parent 2584
70d6fecbccf0
child 2604
3f785deb97eb

Fixed an issue in the Pygments package sorting lexers by relevance.
(grafted from b1c91829321964205348250565bdcada3cd36af7)

ThirdParty/Pygments/pygments/lexers/__init__.py file | annotate | diff | comparison | revisions
--- a/ThirdParty/Pygments/pygments/lexers/__init__.py	Sun Apr 14 18:38:50 2013 +0200
+++ b/ThirdParty/Pygments/pygments/lexers/__init__.py	Thu Apr 18 19:09:20 2013 +0200
@@ -187,7 +187,7 @@
         if rv == 1.0:
             return lexer(**options)
         result.append((rv, lexer))
-    result.sort()
+    result.sort(key=lambda k: k[0])
     if not result[-1][0] and primary is not None:
         return primary(**options)
     return result[-1][1](**options)

eric ide

mercurial