Change:
[ ] Notebooks (.ipynb files) [X] Interactive Window and/or Cell Scripts (.py files with #%% markers)Turn on in Turn on in Open an interactive window and run the following code snippet Version: 1.89.0 Commit: Date: 2024-05-01T02:08:25.066Z Electron: 28.2.8 ElectronBuildId: Chromium: 120.0.6099.291 18.18.2 V8: 12.0.267.19-electron.0 OS: Linux x64 6.8.0-76060800daily20240311-generic v2024.4.0 Python v3.12.1 No response No response Local

Discussion:
const content = createOutputContent(outputInfo.id, formattedStack, outputOptions); const stackTraceElement = document.createElement('div'); stackTraceElement.appendChild(content); <del> stackTraceElement.classList.toggle('word-wrap', ctx.settings.outputWordWrap); </del> <ins> outputElement.classList.toggle('word-wrap', ctx.settings.outputWordWrap); </ins> disposableStore.push(ctx.onDidChangeSettings(e => { <del> stackTraceElement.classList.toggle('word-wrap', e.outputWordWrap); </del> <ins> outputElement.classList.toggle('word-wrap', e.outputWordWrap); </ins> })); if (minimalError) {

} contentParent.classList.toggle('scrollable', outputScrolling); <del> contentParent.classList.toggle('word-wrap', ctx.settings.outputWordWrap); </del> <ins> outputElement.classList.toggle('word-wrap', ctx.settings.outputWordWrap); </ins> disposableStore.push(ctx.onDidChangeSettings(e => { <del> contentParent!.classList.toggle('word-wrap', e.outputWordWrap); </del> <ins> outputElement.classList.toggle('word-wrap', e.outputWordWrap); </ins> })); initializeScroll(contentParent, disposableStore, scrollTop);

const outputOptions = { linesLimit: ctx.settings.lineLimit, scrollable: outputScrolling, trustHtml: false, linkifyFilePaths: ctx.settings.linkifyFilePaths }; const content = createOutputContent(outputInfo.id, text, outputOptions); content.classList.add('output-plaintext'); <del> if (ctx.settings.outputWordWrap) { content.classList.add('word-wrap'); } </del> <ins> outputElement.classList.toggle('word-wrap', ctx.settings.outputWordWrap); disposableStore.push(ctx.onDidChangeSettings(e => { outputElement.classList.toggle('word-wrap', e.outputWordWrap); })); </ins> content.classList.toggle('scrollable', outputScrolling); outputElement.appendChild(content);

white-space: pre; } /* When wordwrap turned on, force it to pre-wrap */ <del> #container div.output_container .word-wrap span { </del> <ins> #container div.output_container .word-wrap { </ins> white-space: pre-wrap; } #container div.output>div {

const inserted = outputElement.firstChild as HTMLElement; assert.ok(inserted, `nothing appended to output element: ${outputElement.innerHTML}`); assert.ok(outputElement.classList.contains('remove-padding'), `Padding should be removed for scrollable outputs ${outputElement.classList}`); <del> assert.ok(inserted.classList.contains('word-wrap') && inserted.classList.contains('scrollable'), </del> <ins> assert.ok(outputElement.classList.contains('word-wrap') && inserted.classList.contains('scrollable'), </ins> `output content classList should contain word-wrap and scrollable ${inserted.classList}`); assert.ok(inserted.innerHTML.indexOf('>content</') > -1, `Content was not added to output element: ${outputElement.innerHTML}`); });

const inserted = outputElement.firstChild as HTMLElement; assert.ok(inserted, `nothing appended to output element: ${outputElement.innerHTML}`); assert.ok(outputElement.classList.contains('remove-padding'), `Padding should be removed for non-scrollable outputs: ${outputElement.classList}`); <del> assert.ok(!inserted.classList.contains('word-wrap') && !inserted.classList.contains('scrollable'), </del> <ins> assert.ok(!outputElement.classList.contains('word-wrap') && !inserted.classList.contains('scrollable'), </ins> `output content classList should not contain word-wrap and scrollable ${inserted.classList}`); assert.ok(inserted.innerHTML.indexOf('>content</') > -1, `Content was not added to output element: ${outputElement.innerHTML}`); });

const inserted = outputElement.firstChild as HTMLElement; assert.ok(inserted, `nothing appended to output element: ${outputElement.innerHTML}`); assert.ok(outputElement.classList.contains('remove-padding'), 'Padding should be removed for scrollable outputs'); <del> assert.ok(inserted.classList.contains('word-wrap') && inserted.classList.contains('scrollable'), </del> <ins> assert.ok(outputElement.classList.contains('word-wrap') && inserted.classList.contains('scrollable'), </ins> `output content classList should contain word-wrap and scrollable ${inserted.classList}`); assert.ok(inserted.innerHTML.indexOf('>Expected type `str`, but received type') > -1, `Content was not added to output element:n ${outputElement.innerHTML}`); assert.ok(inserted.textContent!.indexOf('Expected type `str`, but received type `<class 'int'>`') > -1, `Content was not added to output element:n ${outputElement.textContent}`);

fireSettingsChange({ outputWordWrap: true, outputScrolling: true }); const inserted = outputElement.firstChild as HTMLElement; <del> assert.ok(inserted.classList.contains('word-wrap') && inserted.classList.contains('scrollable'), </del> <ins> assert.ok(outputElement.classList.contains('word-wrap') && inserted.classList.contains('scrollable'), </ins> `output content classList should contain word-wrap and scrollable ${inserted.classList}`); });