Skip to content

Commit

Permalink
Merge pull request #8752 from quarto-dev/bugfix/4802
Browse files Browse the repository at this point in the history
jupyter - use different name for input .ipynb file
  • Loading branch information
cscheid authored Feb 16, 2024
2 parents 9b59f9e + 93a50b7 commit c341936
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/changelog-1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ All changes included in 1.5:

## Jupyter

- ([#4802](https://github.com/quarto-dev/quarto-cli/issues/4802)): Change name of temporary input notebook to avoid accidental overwriting.
- ([#8433](https://github.com/quarto-dev/quarto-cli/issues/8433)): Escape jupyter widget states that contain `</script>` so they can be embedded in HTML documents.

## Website Listings
Expand Down
8 changes: 7 additions & 1 deletion src/execute/jupyter/jupyter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,13 @@ export const jupyterEngine: ExecutionEngine = {
if (isQmdFile(file) || isPercentScript) {
// write a transient notebook
const [fileDir, fileStem] = dirAndStem(file);
const notebook = join(fileDir, fileStem + ".ipynb");
// See #4802
// I don't love using an extension other than .ipynb for this file,
// but doing something like .quarto.ipynb would require a lot
// of additional changes to our file handling code (without changes,
// our output files would be called $FILE.quarto.html, which
// is not what we want). So for now, we'll use .quarto_ipynb
const notebook = join(fileDir, fileStem + ".quarto_ipynb");
const target = {
source: file,
input: notebook,
Expand Down

0 comments on commit c341936

Please sign in to comment.