summaryrefslogtreecommitdiff
path: root/mako/ext/pygmentplugin.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-09-13 23:09:06 +0200
committerFederico Caselli <cfederico87@gmail.com>2021-10-23 11:11:48 +0200
commita1d70afb5974125a1a65f590418c7c371bbdb3e6 (patch)
tree0f4d4ef4170e963aa6784a222e192d16ba753e21 /mako/ext/pygmentplugin.py
parent09cf4f68a7f7f63c2f249d61d7cc6600afe12c1a (diff)
downloadmako-workflow_test_initial_1_2.tar.gz
- remove python 2 support - add github workflows - remove disable unicode - cleanup compat file - modernize setup - use pep517 Change-Id: Ic38dbf478046cec5d0815b468f0c235b4ea5e20c
Diffstat (limited to 'mako/ext/pygmentplugin.py')
-rw-r--r--mako/ext/pygmentplugin.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/mako/ext/pygmentplugin.py b/mako/ext/pygmentplugin.py
index 943a67a..dcfe5c4 100644
--- a/mako/ext/pygmentplugin.py
+++ b/mako/ext/pygmentplugin.py
@@ -25,8 +25,6 @@ from pygments.token import Other
from pygments.token import String
from pygments.token import Text
-from mako import compat
-
class MakoLexer(RegexLexer):
name = "Mako"
@@ -144,10 +142,7 @@ pygments_html_formatter = HtmlFormatter(
def syntax_highlight(filename="", language=None):
mako_lexer = MakoLexer()
- if compat.py3k:
- python_lexer = Python3Lexer()
- else:
- python_lexer = PythonLexer()
+ python_lexer = Python3Lexer()
if filename.startswith("memory:") or language == "mako":
return lambda string: highlight(
string, mako_lexer, pygments_html_formatter