From da46efd27ada998a654cdd42a1a8d919ffd089e1 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Fri, 3 Jun 2011 06:39:13 +0200 Subject: [PATCH] Disabled Pygments --- pastebin/apps/dpaste/highlight.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pastebin/apps/dpaste/highlight.py b/pastebin/apps/dpaste/highlight.py index 0883c0f..51a20f4 100644 --- a/pastebin/apps/dpaste/highlight.py +++ b/pastebin/apps/dpaste/highlight.py @@ -37,6 +37,8 @@ class NakedHtmlFormatter(HtmlFormatter): yield i, t def pygmentize(code_string, lexer_name=LEXER_DEFAULT): + return escape(code_string) + """ try: lexer = get_lexer_by_name(lexer_name) except ValueError: @@ -48,7 +50,8 @@ def pygmentize(code_string, lexer_name=LEXER_DEFAULT): except TypeError: logger.warning('Could not highlight code with lexer "%s"' % lexer_name) return escape(code_string) - + """ + def guess_code_lexer(code_string, default_lexer='unknown'): try: return guess_lexer(code_string).name