# HG changeset patch # User Jeff Hammel # Date 1321565184 28800 # Node ID 777c47bae0ab86f5a6e0da47dff106440d50bdac # Parent f7c6fbce7c9b2fc1c34d79d097a651e8b9e1c09f whitespace diff -r f7c6fbce7c9b -r 777c47bae0ab bitsyblog/bitsyblog.py --- a/bitsyblog/bitsyblog.py Thu Nov 17 13:19:45 2011 -0800 +++ b/bitsyblog/bitsyblog.py Thu Nov 17 13:26:24 2011 -0800 @@ -562,7 +562,6 @@ else: stylesheets = [(self.link(request, "css/site.css"), "Default")] return stylesheets - def site_nav(self, request): """returns HTML for site navigation""" @@ -650,9 +649,10 @@ except UnicodeDecodeError: # TODO: better error handling raise - + def text_blog(self, blog): - + """raw text format of blog""" + if len(blog) == 1: return blog[0].body.strip() + '\n' @@ -661,15 +661,15 @@ print >> buffer, '[ %s ]\n' % entry.date.strftime(self.date_format) print >> buffer, entry.body.strip() + '\n' return buffer.getvalue() - + def restructuredText(self, string): - """renders a string with restructured text""" + """renders a string with restructured text""" body = utils.ReST2html(string) retval = '
%s
' % body return retval # # XXX this should be reenabled if 'system-message's again appear in the markup -# try: +# try: # foo = etree.fromstring(retval) # except etree.XMLSyntaxError: # return retval