Skip to content

Clear forced inline breaks when switching between renderers, when needed #1293

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Jul 2, 2025

When a page has SVG rendering on by default when loaded, and inline breaks are enabled, then when we switch to CHTML output, all the inline breaks are forced to occur. The is due to the way the SVG output has to be broken into separate SVG nodes, so it had marked the nodes for forced breaks, and those marked aren't removed.

The refactors the old code to unmark the breaks if they were set before and we don't want breaks (i.e., the inline breaks menu setting has changed) or the force-break setting is changing (i.e., the render changed). Then we check if breaks are needed and make them again with the new settings. The unsetting and breaking are no longer one-or-the-other, and only the needed actions are taken.

@dpvc dpvc requested a review from zorkow July 2, 2025 14:52
@dpvc dpvc added this to the v4.0 milestone Jul 2, 2025
Copy link

codecov bot commented Jul 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 86.71%. Comparing base (4d1e195) to head (31ffd11).

Files with missing lines Patch % Lines
ts/output/common.ts 0.00% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1293      +/-   ##
===========================================
- Coverage    86.71%   86.71%   -0.01%     
===========================================
  Files          337      337              
  Lines        83979    83984       +5     
  Branches      4750     4750              
===========================================
  Hits         72826    72826              
- Misses       11130    11135       +5     
  Partials        23       23              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant