Port katex-a11y.js to KaTeX (#2062)

* 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
This commit is contained in:
Kevin Barabash
2019-08-02 11:24:51 -04:00
committed by GitHub
parent d82d09bebd
commit 151376e8aa
12 changed files with 2513 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ defineFunction({
return {
type: "mclass",
mode: parser.mode,
mclass: "m" + funcName.substr(5),
mclass: "m" + funcName.substr(5), // TODO(kevinb): don't prefix with 'm'
body: ordargument(body),
isCharacterBox: utils.isCharacterBox(body),
};