Browse Source

Ignore long-lines with urls when in text searching mode

Change-Id: I57b736d441b9650b0f7bc9efe9692b78b6cbf508
Joshua Harlow 4 years ago
parent
commit
06e610bde7
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      doc8/checks.py

+ 2
- 1
doc8/checks.py View File

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

Loading…
Cancel
Save