--- a/plcopen/plcopen.py Thu Jun 08 17:30:23 2017 +0300
+++ b/plcopen/plcopen.py Fri Jun 09 18:12:12 2017 +0300
@@ -125,10 +125,13 @@
test_result = []
result = criteria["pattern"].search(text)
while result is not None:
+ prev_pos=result.endpos
start = TextLenInRowColumn(text[:result.start()])
end = TextLenInRowColumn(text[:result.end() - 1])
test_result.append((start, end, "\n".join(lines[start[0]:end[0] + 1])))
result = criteria["pattern"].search(text, result.end())
+ if result is not None and prev_pos==result.endpos:
+ break
return test_result
def TextMatched(str1, str2):