Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix style handling in SVG exporter #354

Merged
merged 1 commit into from
Jun 5, 2024
Merged

Fix style handling in SVG exporter #354

merged 1 commit into from
Jun 5, 2024

Conversation

martin-fleck-at
Copy link
Contributor

What it does

For some reason our created target elements are not actually instanceof Element even though everything is in their prototype chain. So instead, we now check whether it is an element with tag (HTML, SVG, Math) and whether it has a style property.

How to test

  • Debug and you'll see that we do not keep the style of SVG elements etc.

Follow-ups

Changelog

  • This PR should be mentioned in the changelog
  • This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)

For some reason our created target elements are not actually instanceof
Element even though everything is in their prototype chain. So instead,
we now check whether it is an element with tag (HTML, SVG, Math) and
whether it has a style property.
Copy link
Contributor

@tortmayr tortmayr left a comment

Choose a reason for hiding this comment

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

LGTM!

@martin-fleck-at martin-fleck-at merged commit fce3a6a into master Jun 5, 2024
6 checks passed
@martin-fleck-at martin-fleck-at deleted the fix-exporter branch June 5, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants