Python as default lexer

This commit is contained in:
Martin Mahner 2011-06-02 21:56:52 +02:00
parent 4992571444
commit 2734acb627

View file

@ -38,10 +38,10 @@ class NakedHtmlFormatter(HtmlFormatter):
for i, t in source:
yield i, t
def pygmentize(code_string, lexer_name='text'):
def pygmentize(code_string, lexer_name=LEXER_DEFAULT):
try:
lexer = get_lexer_by_name(lexer_name)
except (TypeError, ClassNotFound):
except ClassNotFound:
logger.warning('Could not find lexer for name "%s"' % lexer_name)
lexer = PythonLexer()