* Use babel-plugin-preval instead of own unicodeMake for unicodeSymbols
* Fix circular dependency transpiling issue
* Flow type unicodeSymbols.js
Co-authored-by: Erik Demaine <edemaine@mit.edu>
* copy katex-a11y.js from webapp to contrib/to-a11y-string.js
* first pass of updating to-a11y-string to use flow
* Set up test harness and write some tests
- add flow types for jest
- create wallaby config file
- add prettier as a dep and set up .prettierrc so that we use .toMatchInlineSnapshot() and have jest insert the snapshot for us
- add lots of TODOs (I'll create tickets for these later)
* Add some to get the tests passing for now
* remove commented out parts of wallaby.js config file
* remove some stale strings, fix flow issue, add more coverage
* add , add few more tests, handle middle
* fix minor nits in tests
* rename to-a11y-string to render-a11y-string, updatte webpack config to build extension
* add test for \boxed
* remove commented out code
* Remove double encoding in MathML via Unicode MathML spaces
We used to have a complex mechanic for escaping strings, marking them as
`needsEscape = false`, and then not escaping those strings (for
combining strings in `\operatorname`). But this doesn't really work
with `render`ing directly to a node, as `document.createTextNode` can't
be stopped from escaping.
I've thus removed this mechanic, which required the following changes:
* Switch MathML "smart space" encoding to use Unicode instead of
`&LongNames;` (which weren't working with `render` for the same reason).
* Hack our HTML/MathML serializer to not use `String.trim`, which wrecks
havoc with emitted Unicode spaces.
Now `toText()` doesn't escape, so strings concatenate in unescaped form,
and `toHTML()` only does the necessary escaping. Thus fix#1782.
* Fix src/utils.js
Co-Authored-By: edemaine <edemaine@mit.edu>
* Fix src/mathMLTree.js documentation
Co-Authored-By: edemaine <edemaine@mit.edu>
* Remove trim hack thanks to diffable-html@4.0.0
* Switch back to jest-serializer-html
* Update mathMLTree.js
* Add optional pre-process callback to the auto-renderer.
* Rewrite `preProcess` callback signature.
* Add test.
* Make test future-proof.
* Add root folder to the node module paths.
* Include only necessary fonts for target environment specified by Browserslist
Allow WOFF and WOFF2 to be controlled using environment variables
* Fix links
* Fix merge error
* Update dependencies
* Replace uglifyjs-webpack-plugin with terser-webpack-plugin
* Do not set `targets` if !isESMBuild
* Create separate entry point of copy-tex for webpack
* Update katex.webpack.js comment
* Generate ECMAScript for contrib
* Update dependencies
* Comment out documentations
* Upgrade to Babel 7
* Update dependencies
* Remove `modules` and `useEsModules` as module support is automatically detected
Target browsers supporting ESM in the ESM build.
* Disable corejs aliasing (polyfill)
* Fix package.json and update lockfile
* Bump CircleCI cache version
* Remove `Object.values()` use for Node 6 compatability
* Remove redundant arguments to @babel/register
* Update rollup and rollup-plugin-babel
* Add ignore option to no-transform-runtime-aliasing
Ignore JSON.stringify, parseInt, and ParseFloat
* Upgrade babel-loader to 8.0.1
* Use api.env() in Babel configuration
* Upgrade babel-loader to 8.0.2
It does so by mercilessly removing the katex/ folder, if it exists
(presumably left by previous failed dist:zip attempts), copying dist/
to katex/, and archiving the latter. On success, katex/ gets removed.
Settled on this version after a more sophisticated script was considered
to use too much POSIX features (like set and trap) in #1665.
Deliberately not adding katex/ to .gitignore because if katex/ shows up,
it indicates that the latest dist attempt has not completed successfully.
* Collect code coverage in screenshotter tests
* Using instanbul, no additional dependencies required as they are part
of jest
* Collect in CircleCI builds and upload to Codecov
* Remove clover report
* screenshotter: replace promisify(fs) and mkdirp with fs-extra
* screenshotter: replace selenium.promise with builtin Promise
* Lint all JavaScript files in the root
* unicodeMake: replace console.log with writeFile(string)
* unicodeMake: check timestamp, do not build if up-to-date
* Replace check-dependencies with yarn check
* Exclude src/unicodeMake.js from coverage
* Add (missing) dependencies
* Skip CircleCI if only unrelated has been changed
* Fix commit range
* Use fs-extra in update-sri