-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If an mfenced element contains line breaks, the delimiters and separators are lost #255
Comments
These != reftests verify that the delimiters and separators are not lost: MathMLToDisplay/Presentation/GeneralLayout/mfenced/issue255-1a.html This != reftest verifies that delimiters or separators are used as possible breakpoints: MathMLToDisplay/Presentation/GeneralLayout/mfenced/issue255-2.html => In testsuite (see my MathJax-test fork) |
…separators are not lost. Resolves issue mathjax#255 (but separators currently aren't able to be breakpoints, so more needs to be done).
The |
OK, I verified the first four tests in Chrome, Opera and Firefox. The fifth test case seems to pass for me too, although the break always happen after a demiliter/separator not after the |
=> Ready for Release |
The current implementation of linebreaking in mfenced elements doesn't consider the delimiters or separators as potential breakpoints (that needs to be fixed). So any breaks occur because of the children in the mfenced. Since mspace is a valid breakpoint, you can still break before that, and so that is the linebreaking you are seeing in your test. Had you used something like I'm wondering if a better test for this would be to compare the <math>
<mfenced open="(" separators="+" close=")">
<!-- ( -->
<mi>x</mi>
<!-- + -->
<mi>x</mi>
<!-- + -->
<mi>x</mi>
<!-- + -->
<mi>x</mi>
<!-- + -->
<mi>x</mi>
<!-- + -->
<mi>x</mi>
<!-- ) -->
</mfenced>
</math> to <math>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>+</mo>
<mi>x</mi>
<mo>+</mo>
<mi>x</mi>
<mo>+</mo>
<mi>x</mi>
<mo>+</mo>
<mi>x</mi>
<mo>+</mo>
<mi>x</mi>
<mo>)</mo>
</mrow>
</math> which should be rendered the same. |
…nd fix up some issues with lines going over the maximum width (due to forgetting to add width of first element after a split). Resolves issue mathjax#255.
OK, I've added code to allow line breaks at the delimiters and separators (I thought of a straight-forward way to do it so decided to go ahead with it now rather than wait until later). |
OK, I've added your testcase and the files seem to match by eye. MathMLToDisplay/Presentation/GeneralLayout/mfenced/issue255-3.html I've also modified issue255-2.html to use mpadded instead of mspace. I will upload these tests after my next commit. => Ready for release. |
…rns out to be needed after all, as info.scanW is changed in the recursive calls). Issue mathjax#255.
Note that my second code block above had a I've also updated |
Yes, don't worry I noticed that when I asked emacs to indent the code.
OK. I think you can merge it to develop, anyway. |
If an
<mfenced>
element contains a line break, the delimiters and separators are lost. Also, the separators and delimiters are not used as possible breakpoints.The text was updated successfully, but these errors were encountered: