Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Oct 29, 2025

This PR fixes a problem with stretchy characters in CHTML where, if they were stretched once and produce a fixed-size version that has a different Unicode position, then are stretched again and need to use a multi-character assembly, then the stretch character would be invisible. This was due to the fact that the since-character version will have set the stretch.c value to the single-size character, and that will be requested in the mjx-stretchy-h (or v) DOM elements, but the CSS added to the page will be fore the original Unicode character, so don't apply to the mjx-stretchy-h element. Since that CSS creates the height and depth of the characters used, it will end up being 0 height, and the clipping for the assembly will end up making it invisible because of that.

The solution used here is, when the symbols is stretched, which check if it was already stretched to a fixed size, and then get a new copy of the stretchy data (without the unwanted c that was added before) and start stretching again.

I also reduced the indentation by returning early for the initial check (since you like that), so it may be easier to view the diffs with spacing differences hidden.

Resolves part of mathjax/MathJax#3457.

@dpvc dpvc requested a review from zorkow October 29, 2025 17:44
@dpvc dpvc added this to the v4.1.0 milestone Oct 29, 2025
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.65%. Comparing base (27c47f3) to head (730a405).

Files with missing lines Patch % Lines
ts/output/common/Wrappers/mo.ts 0.00% 55 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1381      +/-   ##
===========================================
- Coverage    86.66%   86.65%   -0.02%     
===========================================
  Files          338      338              
  Lines        84384    84395      +11     
  Branches      4779     4779              
===========================================
  Hits         73131    73131              
+ Misses       11253    11241      -12     
- Partials         0       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.

2 participants