From 2e56a8a9535058602463530b3ea0dd198fef7660 Mon Sep 17 00:00:00 2001 From: William FH <13333726+hinthornw@users.noreply.github.com> Date: Tue, 11 Jun 2024 18:18:24 -0700 Subject: [PATCH] [Doc] Fix image link (#646) --- docs/_scripts/copy_notebooks.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/_scripts/copy_notebooks.py b/docs/_scripts/copy_notebooks.py index d925f5412..6608f1613 100644 --- a/docs/_scripts/copy_notebooks.py +++ b/docs/_scripts/copy_notebooks.py @@ -114,12 +114,13 @@ def copy_notebooks(): dst_path = os.path.join( overridden_dir, os.path.relpath(src_path, examples_dir) ) - dst_path = dst_path.replace( - "tutorials/tutorials", "tutorials" - ).replace("how-tos/how-tos", "how-tos") print(f"Overriding: {src_path} to {dst_path}") break - + + # Avoid double nesting. + dst_path = dst_path.replace( + "tutorials/tutorials", "tutorials" + ).replace("how-tos/how-tos", "how-tos") os.makedirs(os.path.dirname(dst_path), exist_ok=True) print(f"Copying: {src_path} to {dst_path}") shutil.copy(src_path, dst_path)