diff options
| author | Tanner Prynn <tanner.prynn@nccgroup.trust> | 2016-02-24 17:46:32 -0600 |
|---|---|---|
| committer | Tanner Prynn <tanner.prynn@nccgroup.trust> | 2016-02-24 17:46:32 -0600 |
| commit | 4a49415561c00e2d235d266ee81cb026982f8e20 (patch) | |
| tree | 6bb3883e3689bdeec35178a9504f8e9ab3f99daf /tests/support/python_lexer.py | |
| parent | 604256ba5bdd0e7d707201d119db7035f478234d (diff) | |
| download | pygments-git-4a49415561c00e2d235d266ee81cb026982f8e20.tar.gz | |
Update pull request per comments by birkenfeld.
Add optional function parameter for the class name to instantiate, and update cli to support this.
Move error handling to within the loading functions; they now only raise ClassNotFound.
Modify doc with these updates and the version number.
Test case clean up and additions.
Diffstat (limited to 'tests/support/python_lexer.py')
| -rw-r--r-- | tests/support/python_lexer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/support/python_lexer.py b/tests/support/python_lexer.py index b1367715..f3085748 100644 --- a/tests/support/python_lexer.py +++ b/tests/support/python_lexer.py @@ -17,7 +17,6 @@ from pygments import unistring as uni line_re = re.compile('.*?\n') - class CustomLexer(RegexLexer): """ For `Python <http://www.python.org>`_ source code. @@ -224,3 +223,6 @@ class CustomLexer(RegexLexer): return shebang_matches(text, r'pythonw?(2(\.\d)?)?') or \ 'import ' in text[:1000] + +class LexerWrapper(CustomLexer): + name="PythonLexerWrapper"
\ No newline at end of file |
