Summary:
Add comments everywhere! Also fix some small bugs like using Style.id
instead of Style.size, and rename some variables to be more descriptive.
Fixes#22
Test Plan:
- Make sure the huxley screenshots didn't change
- Make sure the tests still pass
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D13158
Make error messages from the lexing and parsing stages be a bit more helpful. If
provided with the input and a position, the error will display the error
position, and the nearby input with the error position underlined (yay combining
marks). Also, standardize the errors a bit (remove doubled "Error:" strings)
Test plan:
- Make sure the errors look totally sweet (before: {F15602}, after: {F15603})
- Trigger every error (that can be triggered) in Parser, Lexer, and buildTree
using the inputs:
`a^`
`a_`
`a^x^x`
`a_x_x`
`\color f`
`\blue `
`\Huge`
`\llap`
`\text`
`\dfrac`
`\dfrac{x}`
`\d`
`\blue{`
`\color{#f`
`{\Huge{x}}`
- See that the tests still work
Auditors: alpert
Summary:
Add some things in to make this more useful to khan-exercises.
Notably, make KaTeX.process create and clean up its own .katex node, and rename
.mathmathmath -> .katex.
Test Plan: Make test, make sure the main page still renders stuff
Reviewers: alpert
Reviewed By: alpert
Differential Revision: http://phabricator.khanacademy.org/D3061