Skip to content

support em/ex units in root SVG size#131

Merged
swhitty merged 1 commit into
mainfrom
fix-root-em-ex
Jul 15, 2026
Merged

support em/ex units in root SVG size#131
swhitty merged 1 commit into
mainfrom
fix-root-em-ex

Conversation

@swhitty

@swhitty swhitty commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Fixes a regression that was added in 0.28.0 / #126 where SVGs with width/height specified in em / ex units no longer parsed.

While em / ex units are not resolved correctly at all within swift draw, this PR restores the previous behaviour parsing these units as numeric values.

Resolves #130

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.56098% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.81%. Comparing base (edbf753) to head (837ecdb).

Files with missing lines Patch % Lines
DOM/Sources/Parser.XML.SVG.swift 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #131      +/-   ##
==========================================
+ Coverage   89.73%   89.81%   +0.08%     
==========================================
  Files         163      163              
  Lines       12974    13051      +77     
==========================================
+ Hits        11642    11722      +80     
+ Misses       1332     1329       -3     

☔ View full report in Codecov by Harness.
📢 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 force-pushed the fix-root-em-ex branch 2 times, most recently from 23a8b15 to 7ad435d Compare July 15, 2026 23:47
@swhitty swhitty merged commit e49e550 into main Jul 15, 2026
22 checks passed
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.

Regression: SVG(data:) returns nil for documents with ex/em width/height units (worked in 0.20.1, fails in 0.28.0)

1 participant