|
@@ -4106,10 +4106,12 @@ def CheckBraces(filename, clean_lines, linenum, error):
|
|
endpos) = CloseExpression(clean_lines, linenum, pos)
|
|
endpos) = CloseExpression(clean_lines, linenum, pos)
|
|
# Check for an opening brace, either directly after the if or on the
|
|
# Check for an opening brace, either directly after the if or on the
|
|
# next line. If found, this isn't a single-statement conditional.
|
|
# next line. If found, this isn't a single-statement conditional.
|
|
- if (not Match(r'\s*{', endline[endpos:])
|
|
|
|
- and not (Match(r'\s*$', endline[endpos:]) and endlinenum <
|
|
|
|
- (len(clean_lines.elided) - 1) and Match(
|
|
|
|
- r'\s*{', clean_lines.elided[endlinenum + 1]))):
|
|
|
|
|
|
+ if (not Match(r'\s*(?:\[\[(?:un)?likely\]\]\s*)?{', endline[endpos:])
|
|
|
|
+ and not (Match(r'\s*(?:\[\[(?:un)?likely\]\]\s*)?$',
|
|
|
|
+ endline[endpos:])
|
|
|
|
+ and endlinenum < (len(clean_lines.elided) - 1)
|
|
|
|
+ and Match(r'\s*(?:\[\[(?:un)?likely\]\]\s*)?{',
|
|
|
|
+ clean_lines.elided[endlinenum + 1]))):
|
|
while (endlinenum < len(clean_lines.elided)
|
|
while (endlinenum < len(clean_lines.elided)
|
|
and ';' not in clean_lines.elided[endlinenum][endpos:]):
|
|
and ';' not in clean_lines.elided[endlinenum][endpos:]):
|
|
endlinenum += 1
|
|
endlinenum += 1
|