Added support for KiCad explicit net names containing "/" characters - #325
Conversation
…) to the PREFIX_AND_NODES_RGX regex
There was a problem hiding this comment.
🟡 Changes recommended
The regex update should be accompanied by a regression unit test, and the current character class has an unescaped - that unintentionally broadens the allowed node characters.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR updates the SPICE component parsing regex generator to accept KiCad explicit net names that include / characters (e.g. /Vout), addressing the UnrecognizedSyntaxError reported in issue #324.
Changes:
- Extend
PREFIX_AND_NODES_RGXnode-name character classes to include/for both quoted (« ») and unquoted node lists.
File summaries
| File | Description |
|---|---|
| spicelib/editor/spice_utils.py | Expands the node-token regex to allow / in net names so KiCad-style explicit net labels parse correctly. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…avoid unintentional range
|
After making the change to the regex, I've re-run the test suite locally. All pass, but many tests are skipped as I'm running on Linux. Ideally the full suite could be run before merging. |
|
I'll make the test. Exceptionally I'll merge directly into main and make the correction there. |
Modified the PREFIX_AND_NODES_RGX regex, fixes #324