mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
prefix metadata altText
This commit is contained in:
@@ -70,8 +70,8 @@ const domEval = (container: Element) => {
|
||||
|
||||
function getAltText(outputInfo: OutputItem) {
|
||||
const metadata = outputInfo.metadata;
|
||||
if (typeof metadata === 'object' && metadata && 'altText' in metadata && typeof metadata.altText === 'string') {
|
||||
return metadata.altText;
|
||||
if (typeof metadata === 'object' && metadata && 'vscode_altText' in metadata && typeof metadata.vscode_altText === 'string') {
|
||||
return metadata.vscode_altText;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -1427,7 +1427,7 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Themable {
|
||||
const buffer = output.outputs.find(out => out.mime === 'text/plain')?.data.buffer;
|
||||
if (buffer?.length && buffer?.length > 0) {
|
||||
const altText = new TextDecoder().decode(buffer);
|
||||
return { ...output.metadata, altText: altText };
|
||||
return { ...output.metadata, vscode_altText: altText };
|
||||
}
|
||||
}
|
||||
return output.metadata;
|
||||
|
||||
Reference in New Issue
Block a user