Prevents newlines in custom annotations from being removed
This is a draft only... see discussion on https://groups.google.com/forum/?hl=en#!searchin/mathjax-users/amber/mathjax-users/3j3AlkBA1CA/vKVfu7hixQwJ
Hm. Doesn't https://github.com/dpvc/MathJax/commit/44ee2cf7621ac35716d442454d889edfb89ee9ed already cover this?
no for the tex annotation mml.isToken evaluates to true See https://gist.github.com/physikerwelt/3f452ee993256868f01d for a minimal sample.
for the tex annotation mml.isToken evaluates to true
Are you using v2.4? This changed recently, and I think it was v2.4 where the difference occurred. The annotation node should not have isToken true, and if it does, then that needs to be fixed, not hacked here.
OK that might be the problem, we use the wmf clone. I would love to re-factor that, the only problem is that there is a lot of files in MathJax that won't go though the code review. https://github.com/wikimedia/mediawiki-extensions-Math/blob/master/.gitignore I need to check if I can remove those files without trouble.
I checked and the fix for the incorrect isToken on annotation elements was Feb 20th this year (this commit), which makes it part of the changes for v2.4. It was in reference to issue #376.
@dpvc thank you. But I think cherry-picking the changes is a dead end. e.g. unpacked/extensions/toMathML.js does not exist in the wmf clone. I think the way to go is to update to 2.4. Maybe @fred-wang would like to do that?
Why not follow our original advice from the User Group and create a single JavaScript file for on-the-fly patches of MathJax? That way you can cherry pick without touching the copy of MathJax.