fix: parse pin count from jst_ph_X and jst_sh_X footprint strings#513
Open
quantbitrealmSimon wants to merge 1 commit intotscircuit:mainfrom
Open
fix: parse pin count from jst_ph_X and jst_sh_X footprint strings#513quantbitrealmSimon wants to merge 1 commit intotscircuit:mainfrom
quantbitrealmSimon wants to merge 1 commit intotscircuit:mainfrom
Conversation
Fixes tscircuit#495 The jst_ph_X and jst_sh_X footprint string formats (e.g., jst_ph_4) were not correctly parsing the pin count because the regex only matched jst followed immediately by digits. This fix adds a new regex pattern to handle the variant format: - jst_ph_4, jst_sh_6 (with underscore before number) - jst_ph4, jst_sh6 (without underscore) Existing formats like jst2_ph and jst4_sh continue to work.
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.
Fixes #495
Problem
The
jst_ph_Xandjst_sh_Xfootprint string formats (e.g.,jst_ph_4) were not correctly parsing the pin count because the regex only matchedjstfollowed immediately by digits.Solution
Added a new regex pattern to handle the variant format with the pin count after the variant specifier:
jst_ph_4,jst_sh_6(with underscore before number)jst_ph4,jst_sh6(without underscore)Existing formats like
jst2_phandjst4_shcontinue to work.Testing
jst_ph_4now correctly generates 4 padsjst2_phstill correctly generates 2 padsjst4_shstill correctly generates 4 pads/claim