diff options
| author | Georg Brandl <georg@python.org> | 2017-01-22 18:50:35 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2017-01-22 18:50:35 +0000 |
| commit | 3a1d729f6bf94ff5d0233edf094b8afc434c48c8 (patch) | |
| tree | 6a5e1201d68b86542e86554129584237544cd970 /pygments/lexers/__init__.py | |
| parent | c8973a6f5a795a552c9630af2ef8aede1760fd1e (diff) | |
| parent | b91760e77967c722634e73d172d6336d6deccbcd (diff) | |
| download | pygments-git-3a1d729f6bf94ff5d0233edf094b8afc434c48c8.tar.gz | |
Merged in tprynn/pygments-main/command-line-lexer-formatter (pull request #559)
Custom Lexer/Formatter File Loading
Diffstat (limited to 'pygments/lexers/__init__.py')
| -rw-r--r-- | pygments/lexers/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/__init__.py b/pygments/lexers/__init__.py index daedff4b..d5e02e49 100644 --- a/pygments/lexers/__init__.py +++ b/pygments/lexers/__init__.py @@ -5,7 +5,7 @@ Pygments lexers. - :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -72,7 +72,7 @@ def find_lexer_class(name): return cls -def find_lexer_class_by_name(alias): +def find_lexer_class_by_name(_alias): """Lookup a lexer class by alias. Like `get_lexer_by_name`, but does not instantiate the class. @@ -181,8 +181,8 @@ def find_lexer_class_for_filename(_fn, code=None): # gets turned into 0.0. Run scripts/detect_missing_analyse_text.py # to find lexers which need it overridden. if code: - return cls.analyse_text(code) + bonus - return cls.priority + bonus + return cls.analyse_text(code) + bonus, cls.__name__ + return cls.priority + bonus, cls.__name__ if matches: matches.sort(key=get_rating) |
