mathjax / MathJax-node

MathJax for Node
Apache License 2.0
615 stars 97 forks source link

Patch CSSStyleDeclaration to handle units of 'ex' (and others). Resolves issue #233 #234

Closed dpvc closed 8 years ago

dpvc commented 8 years ago

This patches the copy of CSSStyleDeclaration to handle units of ex and a number of other missing units. The change really should only be in one line (the lengthRegEx), but since that is down inside a closure, I can't get my hands on it, so I have to replace the entire valueType() routine with a duplicate that uses my own copy of lengthRegEx. Resolves issue #233.

pkra commented 8 years ago

Travis fails one test -- but the basic SRE one. @zorkow could you check that out?

@dpvc could this use a test based on the underline example?

dpvc commented 8 years ago

could this use a test based on the underline example?

Since it is a jsdom (or rather CSSStyleDeclaration) problem, not a mathjax-node problem, I'm not sure it needs a test here. If you want some tests for the various jsdom issues that we have patched, then I suppose that could be done, but I think it is not necessary.

dpvc commented 8 years ago

PS, the tests passed when I ran them by hand, but I had an older copy of SRE. When I update that, the tests fail. :-(

pkra commented 8 years ago

Since it is a jsdom (or rather CSSStyleDeclaration) problem, not a mathjax-node problem, I'm not sure it needs a test here.

Sounds good to me.

pkra commented 8 years ago

The tests now pass thanks to @zorkow's fixes to SRE. Yay to travis for catching these.