diff --git a/zephyr/zephyr_mirror.py b/zephyr/zephyr_mirror.py index 78542a5b91..46bfe29956 100644 --- a/zephyr/zephyr_mirror.py +++ b/zephyr/zephyr_mirror.py @@ -69,6 +69,17 @@ if __name__ == '__main__': while True: notice = zephyr.receive(block=True) zsig, body = notice.message.split("\x00", 1) + + lines = body.split('\n') + newbody = "" + for i in range(0, len(lines)): + if (i + 1 == len(lines) or + lines[i].strip() == '' or + lines[i+1].strip() == ''): + newbody += lines[i] + "\n" + else: + newbody += lines[i] + " " + if notice.cls not in subs_list: continue zeph = { 'type' : 'class', @@ -77,7 +88,7 @@ if __name__ == '__main__': 'class' : notice.cls, 'instance' : notice.instance, 'zsig' : zsig, # logged here but not used by app - 'new_zephyr': body } + 'new_zephyr': newbody } for k,v in zeph.items(): zeph[k] = cgi.escape(v)