Skip to content

Fix two issues caused by the escape fix #14228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/2 Fixes/14212.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix interactive debugging starting (trimQuotes error).
1 change: 1 addition & 0 deletions news/2 Fixes/14216.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix latex output not showing up without a 'display' call.
2 changes: 1 addition & 1 deletion src/client/datascience/jupyter/jupyterDebugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener {
const data = outputs[0].data;
if (data && data.hasOwnProperty('text/plain')) {
// tslint:disable-next-line:no-any
return (data as any)['text/plain'];
return concatMultilineString((data as any)['text/plain']);
}
if (outputs[0].output_type === 'stream') {
const stream = outputs[0] as nbformat.IStream;
Expand Down
24 changes: 1 addition & 23 deletions src/datascience-ui/interactive-common/cellOutput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,22 +316,6 @@ export class CellOutput extends React.Component<ICellOutputProps> {
input = JSON.stringify(output.data);
renderWithScrollbars = true;
isText = true;
} else if (
output.output_type === 'execute_result' &&
input &&
input.hasOwnProperty('text/plain') &&
!input.hasOwnProperty('text/html')
) {
// Plain text should actually be shown as html so that escaped HTML shows up correctly
mimeType = 'text/html';
isText = true;
isError = false;
renderWithScrollbars = true;
// tslint:disable-next-line: no-any
const text = (input as any)['text/plain'];
input = {
'text/html': lodashEscape(concatMultilineString(text))
};
} else if (output.output_type === 'stream') {
mimeType = 'text/html';
isText = true;
Expand All @@ -341,7 +325,7 @@ export class CellOutput extends React.Component<ICellOutputProps> {
const stream = output as nbformat.IStream; // NOSONAR
const concatted = lodashEscape(concatMultilineString(stream.text));
input = {
'text/html': concatted // XML tags should have already been escaped.
'text/html': concatted
};

// Output may have ascii colorization chars in it.
Expand Down Expand Up @@ -401,12 +385,6 @@ export class CellOutput extends React.Component<ICellOutputProps> {
data = fixMarkdown(concatMultilineString(data as nbformat.MultilineString, true), true);
}

// Make sure text output is escaped (nteract texttransform won't)
if (mimeType === 'text/plain' && data) {
data = lodashEscape(data.toString());
mimeType = 'text/html';
}

return {
isText,
isError,
Expand Down