Skip to content

Commit 10d55c0

Browse files
committed
jupyter - trim whitespace and linebreaks from captions
1 parent a612731 commit 10d55c0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/core/jupyter/jupyter.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,12 @@ async function mdFromCodeCell(
13261326
}
13271327

13281328
// resolve caption (main vs. sub)
1329-
const { cellCaption, outputCaptions } = resolveCaptions(cell);
1329+
let { cellCaption, outputCaptions } = resolveCaptions(cell);
1330+
1331+
// https://github.com/quarto-dev/quarto-cli/issues/5413
1332+
outputCaptions = outputCaptions.map((caption) =>
1333+
caption.trim().replaceAll("\n", " ")
1334+
);
13301335

13311336
// cell_type classes
13321337
divMd.push(`.cell `);

0 commit comments

Comments
 (0)