editors/CodeFileEditor.py
changeset 1109 2dfad20abde3
parent 1104 017cd95bc07e
child 1110 b6e252733c64
equal deleted inserted replaced
1108:1ec5b4d244f3 1109:2dfad20abde3
   197         parts = self.Controler.GetTextParts()
   197         parts = self.Controler.GetTextParts()
   198         text = ""
   198         text = ""
   199         for section in SECTIONS_NAMES:
   199         for section in SECTIONS_NAMES:
   200             section_comments = self.SectionsComments[section]
   200             section_comments = self.SectionsComments[section]
   201             text += section_comments["start"]
   201             text += section_comments["start"]
   202             if not parts[section].startswith("\n"):
   202             if not parts[section].startswith("\n") or parts[section] == "\n":
   203                 text += "\n"
   203                 text += "\n"
   204             text += parts[section]
   204             text += parts[section]
   205             if not parts[section].endswith("\n"):
   205             if not parts[section].endswith("\n"):
   206                 text += "\n"
   206                 text += "\n"
   207             text += section_comments["end"]
   207             text += section_comments["end"]