From: Michal Sojka Date: Mon, 29 Dec 2008 19:27:12 +0000 (+0100) Subject: omkbuild.py: The whole delimiter of legal part belongs to that part X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/commitdiff_plain/bf4982169966240ab2adbab340dcaacd30dfd51b?hp=ad8c2a8486af48b20985a079f2e4624c9209f34e omkbuild.py: The whole delimiter of legal part belongs to that part The delimiter is two empty comment lines. --- diff --git a/omkbuild.py b/omkbuild.py index facccc2..7f01c3b 100755 --- a/omkbuild.py +++ b/omkbuild.py @@ -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()