diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-24 16:34:47 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-24 16:34:47 +0900 |
commit | 51d500833e391c182f536e83a5d62d5e90ce8ca9 (patch) | |
tree | fb854309b759773feb83e7e4bbc91e3ed3cb2b00 /utils/doclinter.py | |
parent | 375fb52fe402d46d633e321ce8f20c1aa61c49b9 (diff) | |
parent | 41ee2d6e6595d0eefb4a2b752fd79a3451382d5a (diff) | |
download | sphinx-git-51d500833e391c182f536e83a5d62d5e90ce8ca9.tar.gz |
Merge branch '3.x' into 7774_remove_develop.rst
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)) |