From 0ace92e15d77b8e883be6d8e93602edb897f03bc Mon Sep 17 00:00:00 2001 From: igurielidze Date: Wed, 1 Apr 2026 19:30:35 +0400 Subject: [PATCH] Fix MCM and EPC missing tagpaths/color/state/priority MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MCM: was returning null for tagpath — now gets System/{mcm}/MCM09 EPC: emitEpc() was building without Ignition data attributes — now includes igAttrs (data-tagpath, data-color, data-state, data-priority) Co-Authored-By: Claude Opus 4.6 (1M context) --- svelte-app/src/lib/export.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/svelte-app/src/lib/export.ts b/svelte-app/src/lib/export.ts index 9943c33..a9bcb76 100644 --- a/svelte-app/src/lib/export.ts +++ b/svelte-app/src/lib/export.ts @@ -143,7 +143,7 @@ function stripButtonSuffix(label: string): string { function getIgnitionTagPath(label: string, mcm: string): string | null { if (!label) return null; - if (/^MCM\d*/i.test(label)) return null; + if (/^MCM\d*/i.test(label)) return `System/${mcm}/${label}`; for (const rule of TAG_PATH_RULES) { if (rule.pattern.test(label)) return `System/${mcm}/${rule.path}/${stripButtonSuffix(label)}`; } @@ -650,7 +650,8 @@ async function emitEpc(lines: string[], sym: PlacedSymbol, label: string, outerT parts.push(` `); } - lines.push(` `); + const igAttrs = getIgnitionAttrs(label); + lines.push(` `); lines.push(parts.join('\n')); lines.push(' '); }