Skip to content

fix(toCanvas): keep literal dollar signs in the Safari shadow rewrites - #563

Merged
tinchox5 merged 1 commit into
zumerlab:mainfrom
jackskip22:fix-tocanvas-literal-dollar
Nov 15, 2026
Merged

tinchox5 merged 1 commit into
zumerlab:mainfrom
jackskip22:fix-tocanvas-literal-dollar

Conversation

@jackskip22

@jackskip22 jackskip22 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

As suggested in #559, the Safari shadow fix on its own.

rewriteSvgBoxShadowToDropShadow and rewriteSvgShadowOffsets replace each <style> block with a string, so $&, $', $` and $$ in a stylesheet are read as replacement patterns (content:"$&" comes back as the whole stylesheet). This passes a function instead. Both helpers are exported for the new regression test, like cropSvgText is.

Tested in Chromium, Firefox and WebKit. The new test fails before and passes after, while the other exporter tests are unchanged.

Both rewrites replaced each <style> block with a string, so $&, $', $` and $$ in the stylesheet were read as replacement patterns. Use a replacement function. Each helper is exported for its regression test, as cropSvgText is.
@tinchox5

Copy link
Copy Markdown
Member

Excellent merging!!!

@tinchox5
tinchox5 merged commit 1aeb57d into zumerlab:main Nov 15, 2026
tinchox5 added a commit that referenced this pull request Nov 17, 2026
Brings 3.7.6 and the Safari dollar-sign fix (#563), ported to safariShadows.js where that code lives now.
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.

2 participants