Allow line formats to pass description body's line length check

1. Lines starting with 4 spaces will not be checked for line length
2. Lines with no space in it will not be checked for line length

Bug: angleproject:4683
Change-Id: Ic648b8b1084762da208d89ee5fbff2b02b69cf12
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2230899
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 78cbeb0..9858db9 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -117,13 +117,16 @@
 
     # loop through description body
     while len(commit_msg_lines) > 0:
-        if len(commit_msg_lines[0]) > description_linelength_limit:
+        line = commit_msg_lines.pop(0)
+        # lines starting with 4 spaces or lines without space(urls) are exempt from length check
+        if line.startswith("    ") or " " not in line:
+            continue
+        if len(line) > description_linelength_limit:
             errors.append(
                 output_api.PresubmitError(
                     "Please ensure that your description body is wrapped to " +
                     str(description_linelength_limit) + " characters or less."))
             return errors
-        commit_msg_lines.pop(0)
     return errors