lint: Enforce that code blocks can't split lines.

Fixes: #1644.
This commit is contained in:
Steve Howell
2016-08-18 07:02:18 -07:00
committed by Tim Abbott
parent 479aa5b83d
commit 88a7ea54d2
2 changed files with 27 additions and 0 deletions

View File

@@ -154,6 +154,8 @@ def validate(fn=None, text=None, check_indent=True):
end_col = end_token.col
problem = None
if (start_tag == 'code') and (end_line == start_line + 1):
problem = 'Code tag is split across two lines.'
if start_tag != end_tag:
problem = 'Mismatched tag.'
elif check_indent and end_line > start_line + 1 and end_col != start_col: