Skip to content

fix: parse elliptical arc flags without separators - #34

Closed
tetap wants to merge 1 commit into
bpmn-io:mainfrom
tetap:fix/21-arc-flag-bnf
Closed

tetap wants to merge 1 commit into
bpmn-io:mainfrom
tetap:fix/21-arc-flag-bnf

Conversation

@tetap

@tetap tetap commented Sep 21, 2026 •

Copy link
Copy Markdown

fix: parse elliptical arc flags without separators
Closes #21
SVG path BNF allows the two arc flags to be adjacent
(e.g. A 5 5 0 10 10 10). The previous number tokenizer
treated those digits as a single value, so compact path
strings dropped or misread the arc.

Proposed Changes

Checklist

Ensure you provide everything we need to review your contribution:

  • Contribution meets our definition of done
  • Pull request establishes context
    • Link to related issue(s), i.e. Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}
    • Brief textual description of the changes
    • Screenshots or short videos showing UI/UX changes
    • Steps to try out, i.e. using the @bpmn-io/sr tool

SVG path BNF allows the two arc flags to be adjacent
(e.g. A 5 5 0 10 10 10). The previous number tokenizer
treated those digits as a single value, so compact path
strings dropped or misread the arc.
@tetap
tetap requested review from a team and a lite review from Copilot September 21, 2026 14:32
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The fix is covered by regression tests and no unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Fixes SVG elliptical-arc parsing when the two flags appear without separators.

Changes:

  • Parses arc flags independently.
  • Adds compact arc parsing and intersection tests.
  • Documents the fix in the changelog.
File Description
test/​intersect.spec.js Adds compact arc syntax tests.
intersect.js Parses adjacent arc flags correctly.
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

nikku commented Sep 21, 2026

Copy link
Copy Markdown
Member

Is this closing #21? If so mark accordingly in the PR description + commit.

@tetap

tetap commented Sep 21, 2026 •

Copy link
Copy Markdown
Author

Is this closing #21? If so mark accordingly in the PR description + commit.

Yes — this closes #21.

I've marked it with Closes https://github.com/bpmn-io/path-intersection/issues/21 in the PR description and the commit.

Thanks for the pointer.

@nikku

nikku commented Sep 21, 2026

Copy link
Copy Markdown
Member

Thanks for your contribution. #35 replaces your (hand written?) parser with a simple regex - matching the way we currently parse path segments. Closing this PR as superseeded.

@nikku nikku closed this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parsePathString does not fully implement arc BNF

4 participants