Skip to content

Commit 450f9c3

Browse files
committed
fix test_markdown.py
1 parent ee43347 commit 450f9c3

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

test/test_documentation/test_markdown.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,16 +348,19 @@ def _check_url(url: str) -> Tuple[bool, Optional[bool]]:
348348
match = match.groups()[0]
349349
if match.startswith('/'):
350350
match = match[1:]
351-
if match:
352-
if match.startswith('tree/main') or match.startswith('blob/main'):
353-
match = match[9:]
354-
if match.startswith('/'):
355-
match = match[1:]
356-
match = (_ROOT / match).exists()
351+
if match:
352+
if match.startswith('tree/main') or match.startswith('blob/main'):
353+
match = match[9:]
354+
if match.startswith('/'):
355+
match = match[1:]
356+
match = (_ROOT / match).exists()
357+
else:
358+
match = match == '.git'
357359
else:
358-
match = match == '.git'
360+
# CaTabRa root
361+
match = True
359362
else:
360-
# CaTabRa root
363+
# CaTabRa root or other repository (catabra-pandas, ...)
361364
match = True
362365

363366
return exists, match

0 commit comments

Comments
 (0)