Skip to content

Use retryAfter() and handleRetriesFor() from mathjax so they are easier to override - #1547

Merged
dpvc merged 3 commits into
developfrom
update/retries
Aug 17, 2026
Merged

Use retryAfter() and handleRetriesFor() from mathjax so they are easier to override#1547
dpvc merged 3 commits into
developfrom
update/retries

Conversation

@dpvc

@dpvc dpvc commented Aug 9, 2026

Copy link
Copy Markdown
Member

This PR moves the references to retryAfter() and handleRetriesFor() to the version in the mathjax variable rather than from the Retries.ts module directly. This makes it easier to override them. I have an example of making MathJax load tex extensions synchronously that would be helped by this, as that means there would be fewer methods that need to be overridden. Together with the synchronous loading of dynamic font data and of entity definitions, this would allow MathJax to be run synchronously in node applications, where synchronous file loading can be achieved.

Note that asyncLoad uses mathjax.asyncLoad internally, so we don't have to use mathjax for that.

@dpvc
dpvc requested a review from zorkow August 9, 2026 11:45
@dpvc dpvc added this to the v4.2 milestone Aug 9, 2026
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.98%. Comparing base (6c2be35) to head (f9610c3).
⚠️ Report is 41 commits behind head on develop.

Files with missing lines Patch % Lines
ts/core/MathDocument.ts 0.00% 3 Missing ⚠️
ts/output/common/FontData.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1547      +/-   ##
===========================================
+ Coverage    86.92%   86.98%   +0.05%     
===========================================
  Files          390      390              
  Lines        87853    87764      -89     
  Branches      4984     4983       -1     
===========================================
- Hits         76370    76343      -27     
+ Misses       11464    11402      -62     
  Partials        19       19              

☔ View full report in Codecov by Harness.
📢 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.

@zorkow zorkow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have two concerns about the new async loading. Please have a look.

Comment thread ts/output/common/FontData.ts Outdated
Comment thread ts/util/Entities.ts Outdated
@dpvc

dpvc commented Aug 15, 2026

Copy link
Copy Markdown
Member Author

I have put back the mathjax.asyncLoad() calls to what they used to be. Do you need to re-review?

@dpvc
dpvc requested a review from zorkow August 15, 2026 14:29
@zorkow

zorkow commented Aug 17, 2026

Copy link
Copy Markdown
Member

I have put back the mathjax.asyncLoad() calls to what they used to be. Do you need to re-review?

No, that looks good now.

@dpvc
dpvc merged commit 0229b96 into develop Aug 17, 2026
2 of 3 checks passed
@dpvc
dpvc deleted the update/retries branch August 17, 2026 12:47
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