# HG changeset patch # User Laurent Bessard # Date 1368135534 -7200 # Node ID 2dfad20abde3eadd84ddd6df7df119280f0dd3bd # Parent 1ec5b4d244f34ddd243eebb3d7575565141b0e73 Fix bug when section code is just an empty line diff -r 1ec5b4d244f3 -r 2dfad20abde3 editors/CodeFileEditor.py --- a/editors/CodeFileEditor.py Thu May 09 19:36:37 2013 +0200 +++ b/editors/CodeFileEditor.py Thu May 09 23:38:54 2013 +0200 @@ -199,7 +199,7 @@ for section in SECTIONS_NAMES: section_comments = self.SectionsComments[section] text += section_comments["start"] - if not parts[section].startswith("\n"): + if not parts[section].startswith("\n") or parts[section] == "\n": text += "\n" text += parts[section] if not parts[section].endswith("\n"):