* Define the nested version of ParseNodes structs explicitly.
Passes test:jest, but fails test:flow.
* Fix additional type errors reported by flow.
* Migrate rebased code from master.
* Rename ParseNode.js to parseNode.js.
* Update defineEnvironment output type to fix the flow errors in environment/array.js.
* Comments without terminating newlines in nonstrict mode
Fix#1506 by allowing single-line comments (`%` without terminating newline)
in nonstrict mode. `Lexer` and `MacroExpander` now store the `Settings`
object, so the `Lexer` can complain about missing newline according to the
`strict` setting. I filtered this out from the snapshot tests with a slightly
different `replacer`.
* Reimplement \href like \verb, add \url
Major restructuring to lex URL arguments differently, e.g. to support
`\href%{hello}` and `\href{http://foo.com/#test%}{hello}`. The new URL
parsing code is simpler, but involves a special case in `parseSymbol`
like `\verb`.
Also add support for `\url` while we're here.
* Cleanup
* Fix flow errors and improve error messages
* Add \url to documentation
* Improve doc formatting
* Fix KaTeX logo
* Add npm badge
* Change CircleCI badge
* Remove redundant links
* Remove unnecessary details
* Add a link to auto-render extension
* Add a link to the list of supported commands
* Add a section about auto-render extension
* Update README.md
* website/docs: initial commit
* Change secondaryColor
* Fix index.css not being copied and included on global stylesheet
* Fix stylesheet link
[skip ci]
* Change documentation link to API(Usage)
[skip ci]
* Add `Libraries` in usage
[skip ci]
* Remove documentation from `README.md` and add link to the site
[skip ci]
* Use KaTeX in the parent directory to build Markdown
[skip ci]
* Revise function support page. Avoid error msgs.
* General edit to function support page
* Do not compile contrib when running screenshotter
* Add test job to CircleCI
* Update config.yml
* Fail if PR exists but running on the forked repo
* Update Screenshotter README.md
* Store artifact at the root
* Add CircleCI badge
* Add `codecov` to CircleCI
* Change build directory to `dist`
* Screenshotter chdir to KaTeX root directory
Fix#1501. This seems to be required for webpack, specifically
`babel-plugin-version-inline`, to run correctly.
* lint fix
* Switch from nomnom to commander
* Fix#1489
* --macro repeatable option replaced with single --macros option with ";"
separator (until https://github.com/tj/commander.js/issues/674)
* Add missing --max-expand option
* Replace expired --unicode-text-in-math-mode option with --strict
(https://github.com/Khan/KaTeX/issues/1483#issuecomment-405108291)
* Add instructions for how to run in the opening comments
* Clean up option doc strings
* Implement @ylemkimon's comments
* Fix try/const bug
* Fix use of --selenium-ip
It was a quirk that --seleniumIP worked. --help lists --selenium-ip.
* Implement comments, restore --macro repeatable argument
* Cleanup
* Restore 0 default for maxExpand
* Fix more comments from @ylemkimon
* npm run dist -> npm run build
In preparation for #1500
* Fix line length error
* Fix \not vertical alignment
Fix#1491 by changing from `position: absolute` to `position: relative`.
* Switch to \rlap implementation of \not
* Separate \not the macro from \not the symbol via \@not
* Fix test
* Support \pmb
* Fix lint error
* Add phony screenshots
* Screenshots take two
* Screenshots take three
* Simplify copies
* Move determination of mclass from handler to htmlBuilder
* Change to a macro definition
* Update screenshots
* Pick up review comments
* Clean up nesting of braces
* Update screenshot
* chore(package): update css-loader to version 1.0.0
* Require minimum Node 6.9
* Use `postcss-loader` and `cssnano` to minimize CSS
* chore(package): update lockfile
* Remove unnecessary `ident` and function
* chore(package): update cssnano to version 4.0.1
* Refactor test helpers
* Combine common codes from `parse` and `build`, and dispatch using
`Mode`
* Remove `toNotBuild` and `toNotParse` and use `expect.not`
* Remove `Warning` and instead mock `console.warn`
* Add `expect.toHavePassed` and check whether parse/build succeeded
lazily
* Improve failed test `message`:
- Use color
- Print stack traces(excluding internals)
- Print diff
- Follow jest matcher output style
* Update helpers.js
* Remove toBeTruthy checks
getParsed throws an error if parsing fails.
* Used tagged literals
* Use .toHaveLength
* Use tagged literals
* Use to{Build,Parse}Like where possible
* Remove compareParseTree
* Use snapshot where possible
* Join into one line where <88 chars
* Revert console.warn() to throw an error
Merge `expectToWarn` to `expectKaTeX`, like
`expect.toFailWithParseError`
* Remove call to console.warn from stack traces
* Fix merge errors
* Remove `getTree`
* Move `_getBuilt` into `getBuilt`
* Move default settings and tagging literal support in to `getParsed`
and `getBuilt`
* Remove stack traces clean-up
* Remove `toHavePassed` matcher
* Extract `expected` string construction into `printExpectedResult`
* \@binrel command and refactor
New `\@binrel{x}{y}` command renders `y` as if it's a bin/rel/ord like `x`.
This is equivalent to AMSTeX's `\binrel@{x}\binrel@@{y}`.
It will hopefully be useful for macros, such as `\pmb` (#1418).
Also refactor the (already duplicated) code for implementing this
functionality into buildCommon.binrelClass.
* Add tests; fix flow error
* Another test
* Move binrelClass to functions/mclass.js
* Remove expensive array destructuring polyfill
* 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.
* \html@mathml
Fix#1452
* Add missing file
* Implement \char (via internal \@char)
* Remove excess <mstyle> wrapper on \mathbin etc.
* Fix tests
* Add Unicode support for \copyright and \textregistered
Testing that this doesn't lead to an infinite loop thanks to \char` escaping.
* Add tests
* Use assertNodeType
* Switch from regex to lookup table, and no parseInt
* Reset `supSub.value.base` after building `supSubGroup`
* Remove tree cloning before building HTML
`buildExpression` is no longer destructive, added comment regarding it,
* Support \genfrac and \above
* Accommodate delimiters inside groups
* Update screenshots take one`
* Update screenshots take two
* Fix flow error
* Fix lint error