Skip to content

Commit 30b136d

Browse files
committed
Improve condition for checking of last missing semi colon
1 parent 74a71ee commit 30b136d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nginx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ def loads(data, conf=True):
515515
index += m.end()
516516
continue
517517

518-
if ";" not in data[index:] and index+1 != len(data):
518+
if ";" not in data[index:] and "}" in data[index:]:
519519
# If there is still something to parse, expect ';' otherwise
520520
# the Key regexp can get stuck due to regexp catastrophic backtracking
521521
raise ParseError("Config syntax, missing ';' at index: {}".format(index))

0 commit comments

Comments
 (0)