summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)