Commit 1f80aa76 by James Cammarata

Fix bug in error detection code, where a zero-length string was causing a traceback

Fixes #5064
parent 30948ae0
......@@ -403,7 +403,7 @@ Or:
match = True
elif middle.startswith('"') and not middle.endswith('"'):
match = True
if middle[0] in [ '"', "'" ] and middle[-1] in [ '"', "'" ] and probline.count("'") > 2 or probline.count("'") > 2:
if len(middle) > 0 and middle[0] in [ '"', "'" ] and middle[-1] in [ '"', "'" ] and probline.count("'") > 2 or probline.count("'") > 2:
unbalanced = True
if match:
msg = msg + """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment