diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-07-07 02:09:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-07 02:09:50 +0900 |
commit | 5e5bca98f752cb61c36afc7955183e79a6095cf2 (patch) | |
tree | 66fc9448a4bbab736469fdad514dfa970787d495 /utils/doclinter.py | |
parent | 988a79de65737e403cd27721ce091760cf62b97f (diff) | |
parent | f0fef96906d80d89e290a780767a92ba85977733 (diff) | |
download | sphinx-git-5e5bca98f752cb61c36afc7955183e79a6095cf2.tar.gz |
Merge branch '4.x' into 6525_linkcheck_warn_redirects
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 |