From b49c376244f63a9fd7a49fcbd563df86ff91a12e Mon Sep 17 00:00:00 2001 From: Ralph Date: Sun, 3 May 2026 11:12:06 +0800 Subject: [PATCH] fix: support imperial sizes for led and diode in string parser Issue #562: String parser fails for led and diode with imperial sizes The proxy handler only recognized 'res' and 'cap' for imperial sizing. Added 'led' and 'diode' to the condition so led0402, diode0603 etc. now parse correctly instead of being treated as pin counts. --- src/footprinter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/footprinter.ts b/src/footprinter.ts index f3d30daa..20730409 100644 --- a/src/footprinter.ts +++ b/src/footprinter.ts @@ -407,7 +407,7 @@ export const footprinter = (): Footprinter & { } else { target[prop] = true target.fn = prop - if (prop === "res" || prop === "cap") { + if (prop === "res" || prop === "cap" || prop === "led" || prop === "diode") { if (v) { if (typeof v === "string" && v.includes("_metric")) { target.metric = v.split("_metric")[0]