Skip to content

Fix problem with sre.style being ignored.#1453

Open
dpvc wants to merge 1 commit intodevelopfrom
fix/menu-sre
Open

Fix problem with sre.style being ignored.#1453
dpvc wants to merge 1 commit intodevelopfrom
fix/menu-sre

Conversation

@dpvc
Copy link
Copy Markdown
Member

@dpvc dpvc commented Apr 4, 2026

Setting options.sre.style in the MathJax configuration ends up being ignored. This is due to the fact that mergeUserSettings() is merging in all the default settings as well as any saved user settings, so that later when applySettings() is performed, the settings.speechRules will always be non-empty, so the sre.domain and sre.style are never applied.

The solution here is to only merge the saved user settings, not all of the defaults.

This can be tested using a fie like:

<!DOCTYPE html>
<html>
<head>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta charset="utf-8"/>
<title>Clearspeak Preferences</title>
<script>
MathJax = {
  options: {
    sre: {
      style: "TriangleSymbol_Delta:ImpliedTimes_MoreImpliedTimes"
    }
  }
};
</script>
<script defer src="[path-to-mathjax-src]/bundle/tex-chtml.js"></script>
</head>
<body>

$$\Delta x$$

</body>
</html>

and check to see that the speech for the expression uses "Delta" and includes "times".

@dpvc dpvc requested a review from zorkow April 4, 2026 18:12
@dpvc dpvc added this to the v4.2 milestone Apr 4, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.45%. Comparing base (da21770) to head (18581af).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##           develop    #1453     +/-   ##
==========================================
  Coverage    86.45%   86.45%             
==========================================
  Files          340      340             
  Lines        86106    86106             
  Branches      3191     4834   +1643     
==========================================
  Hits         74439    74439             
+ Misses       11667    11643     -24     
- Partials         0       24     +24     

☔ 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