From 8aa15ca1822dd9cd8ce020831c3eecaba76d5245 Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Wed, 4 Dec 2024 17:17:14 +0000 Subject: [PATCH 1/2] fix: match any file extension --- packages/jupyter/src/execute/leaf.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/jupyter/src/execute/leaf.tsx b/packages/jupyter/src/execute/leaf.tsx index cda437075..7340aa639 100644 --- a/packages/jupyter/src/execute/leaf.tsx +++ b/packages/jupyter/src/execute/leaf.tsx @@ -140,9 +140,10 @@ export function SessionStarter({ // in order to allow for multiple independent sessions of the same notebook let path = `/${pageSlug}-${notebookSlug}.ipynb`; console.debug('session starter path:', path); - const match = location?.match(/(.*)\/.*.ipynb$/) ?? null; + const match = location?.match(/(.*)\/.*/) ?? null; if (match) { console.debug('session starter match:', match); + // Choose an arbitrary suffix, not important path = `${match[1]}/${pageSlug}-${notebookSlug}.ipynb`; console.debug('session starter path (modified):', path); } From e07326eba750d45205b7668d0f05a7d76dbb25dd Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Wed, 4 Dec 2024 17:39:29 +0000 Subject: [PATCH 2/2] chore: add changeset --- .changeset/new-students-brush.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/new-students-brush.md diff --git a/.changeset/new-students-brush.md b/.changeset/new-students-brush.md new file mode 100644 index 000000000..159ceba28 --- /dev/null +++ b/.changeset/new-students-brush.md @@ -0,0 +1,5 @@ +--- +'@myst-theme/jupyter': patch +--- + +Fix path of non-ipynb files in thebe