Skip to content

Commit 9cb7ccd

Browse files
committed
do not add stray newlines
1 parent 28829ac commit 9cb7ccd

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/core/handlers/base.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,7 @@ export async function expandIncludes(
405405
const newCells: MappedString[] = [];
406406
for (let i = 0; i < mdCells.length; ++i) {
407407
const cell = mdCells[i];
408-
newCells.push(
409-
i === 0 ? cell.sourceVerbatim : mappedConcat(["\n", cell.sourceVerbatim]),
410-
);
408+
newCells.push(cell.sourceVerbatim);
411409
}
412410

413411
await processMarkdownIncludes(newCells, options, filename);
@@ -437,9 +435,7 @@ export async function handleLanguageCells(
437435

438436
for (let i = 0; i < mdCells.length; ++i) {
439437
const cell = mdCells[i];
440-
newCells.push(
441-
i === 0 ? cell.sourceVerbatim : mappedConcat(["\n", cell.sourceVerbatim]),
442-
);
438+
newCells.push(cell.sourceVerbatim);
443439
if (
444440
cell.cell_type === "raw" ||
445441
cell.cell_type === "markdown"
@@ -483,7 +479,6 @@ export async function handleLanguageCells(
483479
(innerLanguageHandler.stage !== "any" &&
484480
innerLanguageHandler.stage !== options.stage)
485481
) { // we're in the wrong stage, so we don't actually do anything
486-
newCells[cell.index] = mappedConcat([newCells[cell.index], "\n"]);
487482
continue;
488483
}
489484
if (
@@ -492,7 +487,6 @@ export async function handleLanguageCells(
492487
) {
493488
// if no handler is present (or a directive was included for something
494489
// that responds to cells instead), we're a no-op
495-
newCells[cell.index] = mappedConcat([newCells[cell.index], "\n"]);
496490
continue;
497491
}
498492
if (innerLanguageHandler.directive === undefined) {

0 commit comments

Comments
 (0)