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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 18 Apr 2013 19:09:20 +0200
changeset 2591
b1c918293219
parent 2590
abe9b3e04381
child 2593
a2df0adce985

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

ThirdParty/Pygments/pygments/lexers/__init__.py file | annotate | diff | comparison | revisions
--- a/ThirdParty/Pygments/pygments/lexers/__init__.py	Thu Apr 18 19:08:09 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