Ignore long-lines with urls when in text searching mode

Change-Id: I57b736d441b9650b0f7bc9efe9692b78b6cbf508
This commit is contained in:
Joshua Harlow 2014-09-08 11:38:04 -07:00
parent 89779ed115
commit 06e610bde7
1 changed files with 2 additions and 1 deletions

View File

@ -202,7 +202,8 @@ class CheckMaxLineLength(ContentCheck):
def _txt_checker(self, parsed_file):
for i, line in enumerate(parsed_file.lines_iter()):
if len(line) > self._max_line_length:
yield (i + 1, 'D001', 'Line too long')
if not utils.contains_url(line):
yield (i + 1, 'D001', 'Line too long')
def _rst_checker(self, parsed_file):
lines = list(parsed_file.lines_iter())