Skip to content

Commit

Permalink
set shell interactivity for documents with server to 'all'
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Oct 3, 2023
1 parent 7da169d commit a24bfab
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/command/render/render-contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
kIncludeBeforeBody,
kIncludeInHeader,
kIpynbFilters,
kIpynbShellInteractivity,
kMetadataFormat,
kOutputExt,
kOutputFile,
Expand Down Expand Up @@ -529,12 +530,15 @@ async function resolveFormats(
inputFormat || {},
);

// if there is no "echo" set by the user then default
// to false for documents with a server
if (userFormat.execute[kEcho] === undefined) {
if (userFormat.metadata[kServer] !== undefined) {
// default 'echo' and 'ipynb-shell-interactivity'
// for documents with a server
if (userFormat.metadata[kServer] !== undefined) {
if (userFormat.execute[kEcho] === undefined) {
userFormat.execute[kEcho] = false;
}
if (userFormat.execute[kIpynbShellInteractivity] === undefined) {
userFormat.execute[kIpynbShellInteractivity] = "all";
}
}

// If options request, force echo
Expand Down

0 comments on commit a24bfab

Please sign in to comment.