aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2014-11-30 19:11:52 +0100
committerVG <vg@devys.org>2014-11-30 19:11:52 +0100
commitc211fa9bda27e879508e25826965fe36e3665872 (patch)
treefbccbea2bba2d64bdb442be4533321e1228ccd3d
parentf6bf1a5b87ff024f46221ea0fca01dbc53481209 (diff)
downloadpasteme-c211fa9bda27e879508e25826965fe36e3665872.tar.gz
pasteme-c211fa9bda27e879508e25826965fe36e3665872.tar.bz2
pasteme-c211fa9bda27e879508e25826965fe36e3665872.zip
fix default lexer with pygments
-rwxr-xr-xpasteme.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pasteme.py b/pasteme.py
index 26c57d1..f054beb 100755
--- a/pasteme.py
+++ b/pasteme.py
@@ -55,9 +55,9 @@ def route_paste_get(pid, pformat='colored'):
if pformat == 'colored':
try:
lexer = pygments.lexers.guess_lexer(content)
- content = pygments.highlight(content, lexer, pygment_formater)
except pygments.util.ClassNotFound:
- pass
+ lexer = pygments.lexers.special.TextLexer()
+ content = pygments.highlight(content, lexer, pygment_formater)
return bottle.template('paste', content=content, pid=pid)
bottle.response.content_type = 'text/plain; charset=UTF8' # HTTP header
return content