Allow long unbreakable strings

We already allow HTTP URLs to ignore the linebreak limit. There are
other reasons to need tokens longer than 80 characters, such as internal
reference names. Allow any length of token so long as it is the only
token on the line.

Change-Id: Iee3e90a5d22d1c4b1180a3f3028b2d4c29cd3377
This commit is contained in:
Alexis Lee 2015-07-13 17:03:45 +01:00
parent 9ddf630100
commit 6469ac9258
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ class TestTitles(testtools.TestCase):
for i, line in enumerate(raw.split("\n")):
if "http://" in line or "https://" in line:
continue
# Allow lines which do not contain any whitespace
if re.match("\s*[^\s]+$", line):
continue
self.assertTrue(
len(line) < 80,
msg="%s:%d: Line limited to a maximum of 79 characters." %