# HG changeset patch # User Jeff Hammel # Date 1604441067 28800 # Node ID bb61d86be013a05f3036a03ab648b861f3cb7209 # Parent 13f6a41882bef8f2101f7318ba361e02d08040af cleanup diff -r 13f6a41882be -r bb61d86be013 bitsyblog/bitsyblog.py --- a/bitsyblog/bitsyblog.py Tue Nov 03 13:36:54 2020 -0800 +++ b/bitsyblog/bitsyblog.py Tue Nov 03 14:04:27 2020 -0800 @@ -655,26 +655,13 @@ buffer = StringIO() for entry in blog: buffer.write('[ {} ]\n\n'.format(entry.date.strftime(self.date_format))) - buffer.write('{}\n\n'.format(entry.body.strip()) + buffer.write('{}\n\n'.format(entry.body.strip())) return buffer.getvalue() def restructuredText(self, string): """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: -# foo = etree.fromstring(retval) -# except etree.XMLSyntaxError: -# return retval -# # should cleanup the
-# for i in foo.getiterator(): -# if dict(i.items()).get('class') == 'system-message': -# i.clear() -# return etree.tostring(foo) - + return '
%s
' % body ### feeds