--- a/plcopen/plcopen.py Thu Jan 18 14:03:29 2018 +0300
+++ b/plcopen/plcopen.py Thu Jan 18 14:24:44 2018 +0300
@@ -152,12 +152,12 @@
test_result = []
result = criteria["pattern"].search(text)
while result is not None:
- prev_pos = result.endpos
+ prev_pos = result.span()[1]
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:
+ if result is not None and prev_pos == result.end():
break
return test_result