From f52fa27e63cf52ebf869d1e1f1d4f42c93ec27e6 Mon Sep 17 00:00:00 2001 From: Artyom Savchenko Date: Tue, 20 Jan 2026 20:11:54 +0700 Subject: [PATCH] Move metadata comment to the end (#10421) Signed-off-by: Artem Savchenko --- plugins/view-resources/src/actionImpl.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/view-resources/src/actionImpl.ts b/plugins/view-resources/src/actionImpl.ts index 0982f9fa9f..65b5199fc7 100644 --- a/plugins/view-resources/src/actionImpl.ts +++ b/plugins/view-resources/src/actionImpl.ts @@ -128,12 +128,7 @@ export async function copyMarkdown (markdown: string, metadata?: Record` - // Insert comment before first table (or at start if no table) - const tableIndex = markdown.indexOf('|') - markdownToCopy = - tableIndex !== -1 - ? markdown.slice(0, tableIndex) + metadataComment + '\n' + markdown.slice(tableIndex) - : metadataComment + '\n' + markdown + markdownToCopy = markdown + '\n' + metadataComment } catch (e) { console.error('Failed to embed metadata in markdown:', e) // Continue with original markdown if embedding fails