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

Strange Mathjax formatting with special characters right next to numbers #62

Open
mstachowsky opened this issue Oct 22, 2021 · 2 comments

Comments

@mstachowsky
Copy link
Owner

If we write a dollar sign right next to a number, such as $5 = x$, this is supposed to be valid Mathjax syntax but it gets parsed into odd characters. I suspect it has something to do with an underlying issue in how we escape and handle the backslash. This does not happen with any other symbols, and it only happens on the first dollar sign, so $x = 5$ is fine. If we add a space, as in $ x = 5$ the issue also goes away.

@mstachowsky mstachowsky changed the title Strange Mathjax formatting with $ right next to numbers Strange Mathjax formatting with special characters right next to numbers Oct 26, 2021
@mstachowsky
Copy link
Owner Author

This behaviour also happens with square brackets, so $x \in [0, 1]$ formats the [0 into a strange character

@mstachowsky
Copy link
Owner Author

Update: I think I understand what is going on. The string starting with [ is used to parse links and other things in the markdown. The function that looks for that (openSquareBracketCheck, and possibly others) in parseToJSON.py does not account for such special characters inside of a MathJax string.

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

No branches or pull requests

1 participant