diff options
Diffstat (limited to 'utils/doclinter.py')
-rw-r--r-- | utils/doclinter.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/doclinter.py b/utils/doclinter.py index f8df20bf7..48e40e90a 100644 --- a/utils/doclinter.py +++ b/utils/doclinter.py @@ -41,7 +41,7 @@ def lint(path: str) -> int: pass else: spaces = LEADING_SPACES.match(line).group(1) - if len(spaces) < code_block_depth: + if len(spaces) <= code_block_depth: in_code_block = False elif LONG_INTERPRETED_TEXT.match(line): pass @@ -49,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 anonymous hyperlink targets + pass elif re.match(r'^\s*``[^`]+``$', line): # ignore a very long literal string pass |