Skip to content

Conversation

ruslansokolov
Copy link

Currently, a file with an empty Path (d="") will throw an error. I came across a file like that while generating SVGs using MathJax. Browsers and other tools seem to be render them fine.

Example (test.svg):

...<path id="MJX-1-TEX-N-2061" d=""></path>...

test.svg

Before:

swiftdraw test.svg --format png --size 500x200 fails.

After:

swiftdraw test.svg --format png --size 500x200 succeeds.

Copy link

codecov bot commented Aug 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.68%. Comparing base (335e287) to head (8f1df09).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #84   +/-   ##
=======================================
  Coverage   89.68%   89.68%           
=======================================
  Files         144      144           
  Lines       12122    12123    +1     
=======================================
+ Hits        10872    10873    +1     
  Misses       1250     1250           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@swhitty swhitty merged commit 44aabdd into swhitty:main Aug 5, 2025
11 checks passed
@swhitty
Copy link
Owner

swhitty commented Aug 5, 2025

Thank you 🙏🏻

I've added some tests and also covered paths that are just whitespace " "

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.

3 participants