Add import for TextLexer. (#5512)

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 13:53:05 -05:00 committed by Carlton Gibson
parent 1a526c153e
commit e704dd2e40

View File

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