Fix incorrect flagging of nested environments. (mathjax/MathJax#3070) #975
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes an incorrect error message about nested environments whenever the
equation
,displaymath
, ormath
environments are used. There were two calls toparser.Push(begin)
inMathJax-src/ts/input/tex/base/BaseMethods.ts
Lines 1709 to 1722 in 49db078
but the first was supposed to have been removed:
7bb5fbd#diff-8b54d4a07ba56e1e6678245687ace65d468dd87cb4c8770a11b261c94d0231a0
Not sure how it got restored (maybe a bad merge or merge conflict resolution). In any case, the first one needs to be removed, as it forces the "Erroneous nesting" message to be produced whenever
\begin{equation}...\end{equation}
is used (and also affects thedisplaymath
andmath
environments).Resolve issue mathjax/MathJax#3070.