mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
doclinter: Allow a very long literal string
This commit is contained in:
parent
3d0818f1cb
commit
0c4edbdb38
@ -50,6 +50,9 @@ def lint(path: str) -> int:
|
|||||||
if re.match(r'^\s*\.\. ', line):
|
if re.match(r'^\s*\.\. ', line):
|
||||||
# ignore directives and hyperlink targets
|
# ignore directives and hyperlink targets
|
||||||
pass
|
pass
|
||||||
|
elif re.match(r'^\s*``[^`]+``$', line):
|
||||||
|
# ignore a very long literal string
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
print('%s:%d: the line is too long (%d > %d).' %
|
print('%s:%d: the line is too long (%d > %d).' %
|
||||||
(path, i + 1, len(line), MAX_LINE_LENGTH))
|
(path, i + 1, len(line), MAX_LINE_LENGTH))
|
||||||
|
Loading…
Reference in New Issue
Block a user