diff options
Diffstat (limited to 'utils/doclinter.py')
-rw-r--r-- | utils/doclinter.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/doclinter.py b/utils/doclinter.py index 52b2fe892..f8df20bf7 100644 --- a/utils/doclinter.py +++ b/utils/doclinter.py @@ -13,7 +13,6 @@ import re import sys from typing import List - MAX_LINE_LENGTH = 85 LONG_INTERPRETED_TEXT = re.compile(r'^\s*\W*(:(\w+:)+)?`.*`\W*$') CODE_BLOCK_DIRECTIVE = re.compile(r'^(\s*)\.\. code-block::') @@ -50,6 +49,9 @@ def lint(path: str) -> int: if re.match(r'^\s*\.\. ', line): # ignore directives and hyperlink targets pass + elif re.match(r'^\s*``[^`]+``$', line): + # ignore a very long literal string + pass else: print('%s:%d: the line is too long (%d > %d).' % (path, i + 1, len(line), MAX_LINE_LENGTH)) |