docs: dont rewrite ipynb links that have double slash (#21775)

This commit is contained in:
Erick Friis
2024-05-16 12:06:30 -07:00
committed by GitHub
parent e3a03b324d
commit 5e445a7e4e

View File

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