Skip to content

Place the hidden svg/defs elements at the beginning of the document, not the end.#1308

Merged
dpvc merged 1 commit into
developfrom
update/defs-position
Jul 18, 2025
Merged

Place the hidden svg/defs elements at the beginning of the document, not the end.#1308
dpvc merged 1 commit into
developfrom
update/defs-position

Conversation

@dpvc
Copy link
Copy Markdown
Member

@dpvc dpvc commented Jul 14, 2025

This PR changes where the MathDocument puts additional elements into the page. Currently, only the SVG output has any of these, and they are the svg element used to store the global font cache (in a defs element). This should be at the top of the document, not the bottom, so that the definitions are in place before the elements that use them (important when the document is preprocessed on the server).

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

codecov Bot commented Jul 14, 2025

Codecov Report

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

Project coverage is 86.71%. Comparing base (4d1e195) to head (82db2ae).
Report is 38 commits behind head on develop.

Files with missing lines Patch % Lines
ts/handlers/html/HTMLDocument.ts 0.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1308      +/-   ##
===========================================
- Coverage    86.71%   86.71%   -0.01%     
===========================================
  Files          337      337              
  Lines        83979    83985       +6     
  Branches      4750     4750              
===========================================
  Hits         72826    72826              
- Misses       11130    11136       +6     
  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.

Copy link
Copy Markdown
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 14f184f into develop Jul 18, 2025
1 of 3 checks passed
@dpvc dpvc deleted the update/defs-position branch July 18, 2025 18:04
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