Repository navigation
fix: parse elliptical arc flags without separators - #35
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Arc parsing regresses valid uppercase scientific notation because the new regex is not case-insensitive.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates SVG arc parsing to accept adjacent arc flags while preserving repeated arc segments.
Changes:
- Added dedicated arc parameter regex parsing.
- Added parsing and intersection regression tests.
- Documented the fix in the changelog.
| File | Description |
|---|---|
intersect.js |
Implements arc-specific parameter parsing. |
test/intersect.spec.js |
Covers compact arc flags and intersections. |
CHANGELOG.md |
Records the fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
nikku
force-pushed
the
nikku-simplify-arc-flag-parsing
branch
from
September 21, 2026 20:38
be218b4 to
7efbc51
Compare
Arc flags are single digits that, per the SVG path BNF, may directly adjoin the preceding number, each other, or the following coordinate (`A 5 5 0 10 10 10` ≡ `A 5 5 0 1 0 10 10`). Parse arc parameters with a dedicated seven-group regex in the existing pathValues style; numbers match greedily (atomically), mirroring reference SVG parsers. Closes #21 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
nikku
force-pushed
the
nikku-simplify-arc-flag-parsing
branch
from
September 21, 2026 20:39
7efbc51 to
a167eb9
Compare
3 of 6 tasks
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.

Proposed Changes
Closes #21
Parses elliptical arc flags without separators (
A 5 5 0 10 10 10≡A 5 5 0 1 0 10 10, per the SVG path BNF) using a single seven-group regex (arcValues) in the style of the existingpathValuespattern. One regex match yields one complete 7-parameter arc segment; numbers match greedily, mirroring reference SVG parsers (covered by a test).Simpler alternative to #34, which it would supersede: same fix and tests in ~25 lines instead of a ~100-line hand-rolled parser.
Try out via
npm install && npm test.Checklist
Ensure you provide everything we need to review your contribution:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtool