From 47ee57c37289ee8cc02b17630c2fd1869602cadf Mon Sep 17 00:00:00 2001 From: Artem Savchenko Date: Tue, 20 Jan 2026 15:39:03 +0700 Subject: [PATCH] Move metadata comment to the end 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 0982f9fa9f7..65b5199fc7e 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