Skip to content

Properly handle trailing spaces in \def. (mathjax/MathJax#3550)#1455

Merged
dpvc merged 1 commit intodevelopfrom
issue3550
Apr 9, 2026
Merged

Properly handle trailing spaces in \def. (mathjax/MathJax#3550)#1455
dpvc merged 1 commit intodevelopfrom
issue3550

Conversation

@dpvc
Copy link
Copy Markdown
Member

@dpvc dpvc commented Apr 5, 2026

This PR fixes a problem with the \def command where trailing spaces are treated incorrectly as part of a template macro definition. E.g.

\def\x#1  {[#1]}

would include the space as part of a template, so $$\x{y}$$ would fail (it would have to be $$\x{y} $$. The trailing spaces should only be included in a template if there are other template entries like

\def\x#1,#2 {[#1,#2]}

or

\def\x#1 #2 {[#1,#2]}

Resolves issue mathjax/MathJax#3550.

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

codecov bot commented Apr 5, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##           develop    #1455     +/-   ##
==========================================
  Coverage    86.45%   86.45%             
==========================================
  Files          340      340             
  Lines        86106    86109      +3     
  Branches      3191     4835   +1644     
==========================================
+ Hits         74439    74442      +3     
  Misses       11667    11667             

☔ 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.

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 a2f9901 into develop Apr 9, 2026
3 checks passed
@dpvc dpvc deleted the issue3550 branch April 9, 2026 12:05
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