]> rtime.felk.cvut.cz Git - omk/sssa.git/commitdiff
omkbuild.py: The whole delimiter of legal part belongs to that part
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 29 Dec 2008 19:27:12 +0000 (20:27 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 19 Feb 2009 07:27:12 +0000 (08:27 +0100)
The delimiter is two empty comment lines.

omkbuild.py

index facccc21d39e42edc433f298a85e9480ef6c5cb5..7f01c3b5064478d5164891bbb52902c6e7095188 100755 (executable)
@@ -103,11 +103,15 @@ class Snippet:
             if currentPart == self.legal:
                 if line.strip() == "#": counter += 1
                 else: counter = 0
-                if counter == 2: currentPart = self.doc
             if line[0] != "#": currentPart = self.code
 
             currentPart.append(line)
 
+            if counter == 2:
+                currentPart = self.doc
+                counter = 0
+
+
         if not self.doc:
             self.doc = self.legal
             self.legal = LineList()