mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Disabled Pygments
This commit is contained in:
parent
db0e060b30
commit
da46efd27a
1 changed files with 4 additions and 1 deletions
|
@ -37,6 +37,8 @@ class NakedHtmlFormatter(HtmlFormatter):
|
||||||
yield i, t
|
yield i, t
|
||||||
|
|
||||||
def pygmentize(code_string, lexer_name=LEXER_DEFAULT):
|
def pygmentize(code_string, lexer_name=LEXER_DEFAULT):
|
||||||
|
return escape(code_string)
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
lexer = get_lexer_by_name(lexer_name)
|
lexer = get_lexer_by_name(lexer_name)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
@ -48,7 +50,8 @@ def pygmentize(code_string, lexer_name=LEXER_DEFAULT):
|
||||||
except TypeError:
|
except TypeError:
|
||||||
logger.warning('Could not highlight code with lexer "%s"' % lexer_name)
|
logger.warning('Could not highlight code with lexer "%s"' % lexer_name)
|
||||||
return escape(code_string)
|
return escape(code_string)
|
||||||
|
"""
|
||||||
|
|
||||||
def guess_code_lexer(code_string, default_lexer='unknown'):
|
def guess_code_lexer(code_string, default_lexer='unknown'):
|
||||||
try:
|
try:
|
||||||
return guess_lexer(code_string).name
|
return guess_lexer(code_string).name
|
||||||
|
|
Loading…
Reference in a new issue