* Support {CD}
* Edit screenshotter test to fit on one page
* Update screenshots
* Remove bogus Safari screenshot
* Edit documentation to avoid tag conflicts and explain delimiters
* Add type annotations
* Add bogus safari screenshot
* Update with real Safari screenshot
* Set label vertical alignment
* Revise call to parseExpression() per PR 2085 changes to macro parsing
* Update Firefox screenshot
* Pick up review comments
* Add unit tests and snapshot.
* Tighten up label collection.
* Better loop index
* remove extra space
* Picked up comments. Added a parse check. Added a test.
Co-authored-by: ylemkimon <y@ylem.kim>
Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
Co-authored-by: Kevin Barabash <kevinb7@gmail.com>
* rewrite of splitAtDelimiters.js -- new fix for #2523
* fix splitAtDelimiters test
* minor changes to splitAtDelimiters
* tweak the indentation a bit
Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
Co-authored-by: Kevin Barabash <kevinb7@gmail.com>
* Bump flow version
* Bump jest version
* Bump eslint version
* Bump rollup version
* Bump webpack version
* Bump misc dependencies and update lockfile
* Update lockfile
* Bump commander version
* Bump misc dependencies
* Bump istanbul version
* Bump docusaurus version
* Update lockfile
* Explicitly declare dependencies
* Bump caniuse-lite version
* Update lockfile
* Bump commander version
* Bump webpack and css-loader version
* Bump flow version
* Add parseNode type `internal`
* Move \def and \newcommand to functions
* Fix Flow error
* Separate \global
Move \newcommand back to macros for now
* Rename assignment.js to def.js
* Update test cases
* Add comments
* Update a test case
* Use html 'defer' attribute
Instead of putting the extension script tag at the bottom, we can use the `defer` attribute to execute the script after all other content is loaded. It has [very good](https://caniuse.com/#feat=script-defer) browser support.
* fix checksums
* use sha384 hashes
* update to Katex 0.11.1
* 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
* 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.
* Create separate entry point of copy-tex for webpack
* Update katex.webpack.js comment
* Generate ECMAScript for contrib
* Update dependencies
* Comment out documentations
* Remove Object.assign() in auto-render which requires expensive polyfill
* Remove underscore.js from LICENSE
* Rename to LICENSE and update year
* Lint `contrib` codes
* Add ignore option for class names
This change adds another option for ignoring nodes for rendering similar to `ignoreTags`.
The new option `ignoreClasses` can hold an array of strings representing class names that should be ignored if they are in a node's class list. This can be desirable in dynamic environments.
* Adhere to CI rules for styling
* Add documentation for new option
* Exchange classList property with IE9 compatible code
* Harmonize variable names
* Add default for ignoredClasses
Within a single call to `renderMathInElement`, default `macros` to a shared
empty object (same as if you specified an object) so that global macros
defined via `\gdef` can be defined and shared.
Fixes issue #1075.
Currently, a row separator such as `\[0.3em]` will cause the auto-render extension to fail if the row separator is placed between `\(…\)` math delimiters.
This PR re-orders the array of left delimiters that get searched for, putting `\[` last in the list. This, `\\[0.3em]` is no longer mistaken for a math delimiter.
This is particularly important as update-sri.js only updates jsdelivr links.
I was able to get update-sri.js to do the heavy lifting (computing checksums)
after updating the links in general, and downloading v0.10.0-alpha from CDN.
* Create a separate entry point for webpack
Created a webpack entry point for KaTeX, which imports katex.less. As
flow[1] and jest[2] doesn't support CSS modules natively, a separate
entry point is used and it is not flowtyped.
[1] https://gist.github.com/lambdahands/d19e0da96285b749f0ef
[2] https://facebook.github.io/jest/docs/en/webpack.html
* Use webpack to build files
* Made webpack.config.js export valid webpack configuration
* Use:
browserify -> webpack
babelify -> babel-loader
UglifyJS CLI -> UglifyJsPlugin
Less CLI -> less-loader
cleancss -> cssnano in css-loader
build/fonts -> file-loader
* Inline CSS(Less) using style-loader and export them using
ExtractTextPlugin
* Add `watch` npm script calling `webpack --watch`
* Improve local testing(webpack-dev-server)
* Made webpackDevServer export a valid webpack configuration
* Compile Less and inline CSS using less-loader and style-loader
* Instead of copying files serve files from /static and use file-loader
* Remove old server.js and its dependencies
* Use webpack-dev-server in Screenshotter
* Include contrib in webpack-dev-server
+ Moved common configurations to webpack.common.js
* Rename webpackDevServer.js to webpack.dev...
to be consistent, avoid confusion with webpack-dev-server and follow
webpack configuration naming convention.
* Remove unnecessary conditional output.path
* Use map instead of reduce
+ Add comments regarding function arguments
* Remove unnecessary mkdir and clean build/* before build
* Use katex as external dependency instead of global variable in contrib
Fixes#692.
* Unblock codes as they are built as a module
* Update package-lock.json
* Add comments regarding devServer option
* Lint renamed webpack.dev.js
a0d8b33
* Export ES6 module and expose its default export
* Revert "Browserify hotfix (#1057)"
This reverts commit f6b509123b.
* Enables colors on the console when running the dev server in Screenshotter
* Add context to webpack configuration
Allows webpack to be run from other directories
* Move `rm -rf build/*` to npm scripts
* Check dependencies before build
* Move UglifyJsPlugin into config creation
* Let webpack handle ES6 modules
Do not transform modules to commonjs in Babel. However Jest doesn't not
support ES6 modules, so transfrom modules to commonjs when NODE_ENV is
`test`.
* Add documentation on testing in IE 9 and 10 using webpack-dev-server
Changed version range to include IE-compatible version
This is an attempt to flesh out the required <head> tags needed to make a full
working example of autorender, including KaTeX itself, to help people get
started with KaTeX.