From 2d7a215c5661ab74e6f52a1ecac71a1f802063f9 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 7 Feb 2010 17:07:33 +0100 Subject: Default syntax to 'text' when generating cache. --- pastepy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3