changeset 111:bb61d86be013

cleanup
author Jeff Hammel <k0scist@gmail.com>
date Tue, 03 Nov 2020 14:04:27 -0800
parents 13f6a41882be
children d1114b31aaf1
files bitsyblog/bitsyblog.py
diffstat 1 files changed, 2 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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 = '<div class="blog-body">%s</div>' % 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 <div class="system-message">
-#         for i in foo.getiterator():
-#             if dict(i.items()).get('class') ==  'system-message':
-#                 i.clear()
-#         return etree.tostring(foo)
-
+        return '<div class="blog-body">%s</div>' % body
 
     ### feeds