Commit Graph

4 Commits

Author SHA1 Message Date
Ron Kok
2b83935064 Improve MathML for classes (#1929)
* Improve MathML for classes

* Fix lint errors

* Fix another lint error

* Simplify MathML resulting from single character box

* Fix lint errors

* make some of the arrays in our html/mathml helper functions readonly
2019-07-05 01:14:05 -04:00
Kevin Barabash
539172098a simplify combining chars (#1633)
* simplify comibining chars

* try combining chars in text operators instead of all ordgroups

* ensure that adjacent chars have the same classes

* fix phantom tests

* extract canCombe from tryCombineChars, check for skew and maxFontSize

* check prev.italic !== next.italic

* use the last character's italic correction.
2018-08-23 17:38:36 -04:00
Kevin Barabash
b2432e8ad2 make all classes in domTree.js PascalCase and make them named exports (#1636)
* make all classes in domTree.js PascalCase and make them named exports

* add eslint rule to enforce capitalization, fix failures

* address feedback
2018-08-19 23:49:21 +09:00
Ashish Myles
f0976ade26 Refactor documentFragment and implement both HtmlDomNode and MathDomNode interfaces (stepping stone to port buildMathML to flow) (#1478)
* Make MathNodeClass include documentFragment for ergonomics.

* Separate out the HTML and MathML documentFragments.

These two documentFragments have different additional properties/methodsi
and limitations. This separation is needed for porting buildMathML to
flow.

* Coalesce the documentFragment subclasses to avoid subclassing polyfill.

* Make DomSpan and SvgSpan type aliases again instead of subclasses.

* Remove type MathNodeClass in favor of MathDomNode.

* Resolve $FlowFixMes by reordering variants of a union type.
2018-07-16 15:41:27 +09:00