summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-02-07 17:07:33 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-02-07 17:07:33 +0100
commit2d7a215c5661ab74e6f52a1ecac71a1f802063f9 (patch)
tree410665496a47a002e7293fd5e9a09e6d63f08957
parent57b8aead119fd36c2e272eb4b56e0188977fd7fd (diff)
Default syntax to 'text' when generating cache.
-rw-r--r--pastepy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pastepy.py b/pastepy.py
index 0148294..dae4dd9 100644
--- a/pastepy.py
+++ b/pastepy.py
@@ -108,7 +108,7 @@ class Paste(object):
def view(self):
def get_formatted(syntax, text):
- lex = get_lexer_by_name(syntax)
+ lex = get_lexer_by_name(syntax or 'text')
lexername = lex.name
text = highlight(text, lex, self.formatter)
return (lexername, text)