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: for i, t in source:
yield i, t yield i, t
def pygmentize(code_string, lexer_name='text'): def pygmentize(code_string, lexer_name=LEXER_DEFAULT):
try: try:
lexer = get_lexer_by_name(lexer_name) lexer = get_lexer_by_name(lexer_name)
except (TypeError, ClassNotFound): except ClassNotFound:
logger.warning('Could not find lexer for name "%s"' % lexer_name) logger.warning('Could not find lexer for name "%s"' % lexer_name)
lexer = PythonLexer() lexer = PythonLexer()