Add import for TextLexer.

If pygments did not recognize the language name it was being passed,
this would raise a `NameError` because `TextLexer` import was missing.
This commit is contained in:
Dustin Wyatt 2017-10-18 11:43:47 -05:00
parent 320f10ad00
commit 79a9821a4f

View File

@ -213,7 +213,7 @@ except ImportError:
try:
import pygments
from pygments.lexers import get_lexer_by_name
from pygments.lexers import get_lexer_by_name, TextLexer
from pygments.formatters import HtmlFormatter
def pygments_highlight(text, lang, style):