mirror of
https://github.com/Microsoft/vscode
synced 2024-07-05 01:08:57 +00:00
Check for attachment:
in markdown cell renderer (#181462)
actually check if its json attachment style...
This commit is contained in:
parent
03d10051e1
commit
f198ea9177
|
@ -23,7 +23,7 @@ export async function activate(ctx: RendererContext<void>) {
|
||||||
const token = tokens[idx];
|
const token = tokens[idx];
|
||||||
const src = token.attrGet('src');
|
const src = token.attrGet('src');
|
||||||
const attachments: Record<string, Record<string, string>> | undefined = env.outputItem.metadata?.attachments;
|
const attachments: Record<string, Record<string, string>> | undefined = env.outputItem.metadata?.attachments;
|
||||||
if (attachments && src) {
|
if (attachments && src && src.startsWith('attachment:')) {
|
||||||
const imageAttachment = attachments[tryDecodeURIComponent(src.replace('attachment:', ''))];
|
const imageAttachment = attachments[tryDecodeURIComponent(src.replace('attachment:', ''))];
|
||||||
if (imageAttachment) {
|
if (imageAttachment) {
|
||||||
// objEntries will always be length 1, with objEntries[0] holding [0]=mime,[1]=b64
|
// objEntries will always be length 1, with objEntries[0] holding [0]=mime,[1]=b64
|
||||||
|
|
Loading…
Reference in New Issue
Block a user