Skip to content
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

Error 't.splitText is not a function' when an opening math delimiter immediately follows a <br> tag #2288

Closed
christianp opened this issue Jan 9, 2020 · 1 comment
Labels

Comments

@christianp
Copy link
Contributor

@christianp christianp commented Jan 9, 2020

Here's a small example on codepen: https://codepen.io/christianp/pen/VwYXxXY

It contains the following HTML:

<p>Suppose \( x \in \mathbb{R} \)<br>is such that <br>\( \forall (s,t)\in \mathbb{Q}^2, |x-s|=|x-t| \implies s=t. \)<br>Then </p>

The problem is the bit of math \forall ... that begins immediately after the second <br> tag. If I put a space in between the <br> and \(, there's no error. When there's no space, the offending line is
https://github.com/mathjax/MathJax-src/blob/070448bc97b97fe83e9ec8027665373d347f1032/ts/handlers/html/HTMLMathItem.ts#L83
It looks like the <br> tag gets into the list of text nodes somehow. I haven't looked any deeper into how that happens.

@dpvc

This comment has been minimized.

Copy link
Member

@dpvc dpvc commented Jan 9, 2020

Yes, this a known issue (duplicate of #2202), which is fixed in PR mathjax/MathJax-src#346. Thanks for reporting it, though.

I'm moving this issue to the mathjax/MathJax, as we would like all the MathJax issues to be in the same place, for ease of searching.

@dpvc dpvc transferred this issue from mathjax/MathJax-src Jan 9, 2020
@dpvc dpvc added the Duplicate label Jan 9, 2020
@christianp christianp closed this Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.