mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Cell attachment cleanup tool improvement in diff editor (#161132)
* Move attachment out of custom metadata, prep for attachment clean up in diff editor * recover attachments from dirty notebook document * Allow metadata to be restored when content changed/reverted in nb diff editor
This commit is contained in:
@@ -22,7 +22,7 @@ export async function activate(ctx: RendererContext<void>) {
|
||||
md.renderer.rules.image = (tokens: MarkdownItToken[], idx: number, options, env, self) => {
|
||||
const token = tokens[idx];
|
||||
const src = token.attrGet('src');
|
||||
const attachments: Record<string, Record<string, string>> = env.outputItem.metadata.custom?.attachments;
|
||||
const attachments: Record<string, Record<string, string>> = env.outputItem.metadata.attachments;
|
||||
if (attachments && src) {
|
||||
const imageAttachment = attachments[src.replace('attachment:', '')];
|
||||
if (imageAttachment) {
|
||||
|
||||
Reference in New Issue
Block a user