fix: string parser now handles led and diode imperial sizes#610
Open
64johnlee wants to merge 3 commits into
Open
fix: string parser now handles led and diode imperial sizes#61064johnlee wants to merge 3 commits into
64johnlee wants to merge 3 commits into
Conversation
added 3 commits
April 29, 2026 01:02
Issue tscircuit#562 - String parser fails for led and diode with imperial sizes. The fix adds 'led' and 'diode' to the list of passive footprints that use imperial/metric sizing (alongside res and cap).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Issue #562 - String parser fails for led and diode with imperial sizes.
Problem: The string parser does not correctly handle imperial/metric size codes for
ledanddiodefootprints. Whileres0402andcap0603work correctly,led0402anddiode0603throw an error.Root Cause: In
src/footprinter.ts, the proxy handler only recognizesresandcapas passive footprints that use imperial/metric sizing.Solution: Added
ledanddiodeto the list of passive footprints that use imperial sizing.Testing
led0402now correctly parses as{ fn: "led", imperial: "0402" }diode0603now correctly parses as{ fn: "diode", imperial: "0603" }