Clone or download
davidflanagan Fallback to MathJAX on any Katex error, not just parse errors
Summary:
Bugs CP-879 and CP-1742 are caused by a TypeError thrown by KaTeX.
We already fall back to MathJAX rendering when KaTeX throws a parse
error. But currently we rethrow other kinds of errors. This patch
changes that so we fallback to MathJAX for any kind of KaTeX error.

The underlying KaTeX error has been fixed upstream and will go away
when we upgrade webapp to use KaTeX 1.0. Since we've got the MathJAX
fallback, however, it seems worth using it in case other errors arise
in the future.

Test Plan:
Visit the following URL with this patch and verifies that it renders:
http://localhost:8081/math/k-8-grades/fr-v2-terminale-s/fr-v2-matrices-enseignement-de-spcialit/fr-v2-oprations-sur-les-matrices/a/multiplying-matrices-by-scalars?lang=fr

Reviewers: kevinb, michaelpolyak

Reviewed By: kevinb

Subscribers: tom

Differential Revision: https://phabricator.khanacademy.org/D50139
Latest commit a9315ce Nov 9, 2018
Permalink
Failed to load latest commit information.
docs Update the <TeX> component to the latest upstream KaTeX Feb 22, 2018
examples Fix up a number of issues in react-components. Dec 8, 2016
js Fallback to MathJAX on any Katex error, not just parse errors Nov 12, 2018
react-live-editor @ a050794 Give up on trying to update react-live-editor. Dec 20, 2016
test Update react-components with support for React 16.3.0 Jul 17, 2018
.arcconfig Add default .arcconfig/.arclint file Jul 29, 2015
.arclint Fix the regexp for arc lint to correctly only match a single line. Oct 13, 2015
.babelrc Use Babel es2015 and disable prepublish step. Dec 8, 2016
.gitignore Actually add polyfill file and don't ignore test/ Sep 4, 2014
.gitmodules Fix up a number of issues in react-components. Dec 8, 2016
.npmignore 0.1.1 - create .npmignore. Jun 26, 2014
.travis.yml Actually fix travis builds Mar 23, 2016
LICENSE Add license. Apr 8, 2014
Makefile Fix up a number of issues in react-components. Dec 8, 2016
README.md README: Add a link to the demo site! Feb 6, 2015
lint_blacklist.txt Add some built files to the lint_blacklist.txt May 5, 2016
make_template.py Automatic lint ignore for khan-linter upgrade Apr 14, 2017
package-lock.json Update react-components with support for React 16.3.0 Jul 17, 2018
package.json Update react-components with support for React 16.3.0 Jul 17, 2018
prepublish.js Fix up a number of issues in react-components. Dec 8, 2016
reactify-components.jsx Fix up a number of issues in react-components. Dec 8, 2016
requirements.txt Command to build docs Apr 17, 2014
template.html Fix up a number of issues in react-components. Dec 8, 2016

README.md