docs: dont rewrite ipynb links that have double slash (v0.1) (#21776)

This commit is contained in:
Erick Friis 2024-05-16 13:26:09 -07:00 committed by GitHub
parent d53de65aca
commit c9ec8c5d07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,9 @@ class EscapePreprocessor(Preprocessor):
)
# rewrite .ipynb links to .md
cell.source = re.sub(
r"\[([^\]]*)\]\(([^)]*).ipynb\)", r"[\1](\2.md)", cell.source
r"\[([^\]]*)\]\((?![^\)]*//)([^)]*)\.ipynb\)",
r"[\1](\2.md)",
cell.source,
)
return cell, resources