1
0
Fork 0

handle non-proper terminated docublocks

This commit is contained in:
Willi Goesgens 2015-08-14 14:45:28 +02:00
parent 1cf67a9df2
commit 6ea2d42b94
1 changed files with 7 additions and 1 deletions

View File

@ -20,16 +20,22 @@ def file_content(filepath):
comment_indexes = []
comments = []
_start = None
for line in enumerate(filelines):
if "@startDocuBlock" in line[1]:
# in the mdpp's we have non-terminated startDocuBlocks, else its an error:
if _start != None and not 'mdpp' in filepath:
print "next startDocuBlock found without endDocuBlock inbetween in file %s [%s]" %(filepath, line)
raise
_start = line[0]
if "@endDocuBlock" in line[1]:
try:
_end = line[0] + 1
comment_indexes.append([_start, _end])
_start = None
except NameError:
print "endDocuBlock without previous startDocublock seen while analyzing %s [%s]" %(filepath, line)
print "endDocuBlock without previous startDocublock seen while analyzing file %s [%s]" %(filepath, line)
raise
for index in comment_indexes: