Skip to content

Commit d2d46fb

Browse files
committed
Remove disused resolve outputfile
1 parent 1fa7fe6 commit d2d46fb

File tree

5 files changed

+3
-13
lines changed

5 files changed

+3
-13
lines changed

src/render/notebook/notebook-context.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,13 @@ export function notebookContext(): NotebookContext {
194194
renderType: RenderType,
195195
executedFile: ExecutedFile,
196196
notebookMetadata?: NotebookMetadata,
197-
outputFile?: string,
198197
) => {
199198
addMetadata(nbAbsPath, renderType, notebookMetadata);
200199
return contributor(renderType).resolve(
201200
nbAbsPath,
202201
token(),
203202
executedFile,
204203
notebookMetadata,
205-
outputFile,
206204
);
207205
},
208206
addRendering,

src/render/notebook/notebook-contributor-html.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,11 @@ async function resolveHtmlNotebook(
6060
_token: string,
6161
executedFile: ExecutedFile,
6262
notebookMetadata?: NotebookMetadata,
63-
outputFile?: string,
6463
) {
6564
const resolved = ld.cloneDeep(executedFile) as ExecutedFile;
6665

6766
// Set the output file
68-
resolved.recipe.format.pandoc[kOutputFile] = outputFile ||
69-
`${basename(nbAbsPath)}.html`;
67+
resolved.recipe.format.pandoc[kOutputFile] = `${basename(nbAbsPath)}.html`;
7068
resolved.recipe.output = resolved.recipe.format.pandoc[kOutputFile];
7169

7270
// Configure echo for this rendering to ensure there is output

src/render/notebook/notebook-contributor-ipynb.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ function resolveOutputNotebook(
4747
_token: string,
4848
executedFile: ExecutedFile,
4949
_notebookMetadata?: NotebookMetadata,
50-
outputFile?: string,
5150
) {
5251
const resolved = ld.cloneDeep(executedFile);
53-
resolved.recipe.format.pandoc[kOutputFile] = outputFile || ipynbOutputFile(
54-
nbAbsPath,
55-
);
52+
resolved.recipe.format.pandoc[kOutputFile] = ipynbOutputFile(nbAbsPath);
5653
resolved.recipe.output = resolved.recipe.format.pandoc[kOutputFile];
5754

5855
resolved.recipe.format.pandoc.to = "ipynb";

src/render/notebook/notebook-contributor-jats.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ function resolveJats(
5353
token: string,
5454
executedFile: ExecutedFile,
5555
_notebookMetadata?: NotebookMetadata,
56-
outputFile?: string,
5756
) {
5857
const resolved = ld.cloneDeep(executedFile);
5958
resolved.recipe.format.metadata[kLintXml] = false;
@@ -62,9 +61,8 @@ function resolveJats(
6261
resolved.recipe.format.pandoc[kOutputFile] = jatsOutputFile(
6362
nbAbsPath,
6463
);
64+
resolved.recipe.output = resolved.recipe.format.pandoc[kOutputFile];
6565
resolved.recipe.format.pandoc.to = "jats";
66-
resolved.recipe.output = outputFile ||
67-
resolved.recipe.format.pandoc[kOutputFile];
6866
resolved.recipe.format.pandoc[kTemplate] = subarticleTemplatePath;
6967

7068
// Configure echo for this rendering

src/render/notebook/notebook-types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ export interface NotebookContributor {
112112
token: string,
113113
executedFile: ExecutedFile,
114114
notebookMetadata?: NotebookMetadata,
115-
outputFile?: string,
116115
): Promise<ExecutedFile>;
117116
render(
118117
nbAbsPath: string,

0 commit comments

Comments
 (0)