Commit Graph

6 Commits

Author SHA1 Message Date
Ben Alpert
c08fadfaa9 Parse single superscripts and subscripts
Summary:
Add the ability to parse lone `^x` and `_y`, etc. This basically just
involves more checking of cases in the increasingly ugly `parseAtom` function.
Also, now we manually check for the cases of double superscripts and
subscripts.

Test Plan: Make sure the tests pass. Make sure things like `^x` and `_y` parse.

Reviewers: emily

Reviewed By: emily

Differential Revision: http://phabricator.khanacademy.org/D3095
2013-07-16 22:00:54 -07:00
Emily Eisenberg
bcd6e8687f Fix the failing frac test
Summary: Also add some more frac tests

Auditors: alpert
2013-07-16 17:46:58 -07:00
Emily Eisenberg
38e2d600fd Allow some functions to have letters after them
Summary: Allow there to be letters immediately after \ , \;, \,, \:.

Test Plan: Run the tests

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D3031
2013-07-13 00:05:41 -07:00
Emily Eisenberg
5871d1756f Fix typo, so we actually test x_x_x
Auditors: alpert
2013-07-12 23:17:32 -07:00
Emily Eisenberg
4122fa2b99 Rewrite the parser
Summary:
Make our own parser that doesn't use jison, so that we can handle
funny TeX syntax, and to make it smaller.

Test Plan: Make sure the tests pass with the new parser.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D3029
2013-07-12 23:16:30 -07:00
Emily Eisenberg
507a552ffd Add some basic testing using jasmine
Summary:
Make some tests that test the parser. So far, there are no DOM tests,
but maybe later.

Test Plan:
Run `make serve` and then visit `/test/test.html`. Make sure all the
tests pass.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D2987
2013-07-11 18:32:44 -07:00