Thu, 18 Apr 2013 19:09:20 +0200
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)