mirror of
https://github.com/Microsoft/vscode
synced 2024-07-17 11:07:22 +00:00
prefix metadata altText
This commit is contained in:
parent
24842542bf
commit
d6db619ce7
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue