Skip to content

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

Merged
dpvc merged 2 commits intodevelopfrom
fix/inline-breaks
Jul 18, 2025
Merged

Clear forced inline breaks when switching between renderers, when needed#1293
dpvc merged 2 commits intodevelopfrom
fix/inline-breaks

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 marks aren't removed.

This 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
@codecov
Copy link

codecov bot commented Jul 2, 2025

Codecov Report

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

Project coverage is 86.71%. Comparing base (4d1e195) to head (d55b576).
Report is 23 commits behind head on develop.

Files with missing lines Patch % Lines
ts/output/common.ts 0.00% 14 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1293      +/-   ##
===========================================
- Coverage    86.71%   86.71%   -0.01%     
===========================================
  Files          337      337              
  Lines        83979    83988       +9     
  Branches      4750     3124    -1626     
===========================================
  Hits         72826    72826              
- Misses       11130    11162      +32     
+ Partials        23        0      -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.

Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

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

lgtm.

Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

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

lgtm.

@dpvc dpvc merged commit 3fc3801 into develop Jul 18, 2025
1 of 3 checks passed
@dpvc dpvc deleted the fix/inline-breaks branch July 18, 2025 17:56
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