Commits

Andriy Kornatskyy  committed 28f7ce4

If the current line ends with : prepend code with no ; in between.

  • Participants
  • Parent commits 1f029ae

Comments (0)

Files changed (1)

File src/wheezy/template/builder.py

         if lineno == self.lineno:
             line = self.buf[-1]
             if line:
-                self.buf[-1] = line + '; ' + code
+                if line[-1:] == ':':
+                    self.buf[-1] = line + code
+                else:
+                    self.buf[-1] = line + '; ' + code
             else:
                 self.buf[-1] = code
         else: