Commit Graph

10 Commits

Author SHA1 Message Date
James Lee
549104c5a8 auto-renderer README.md - added integrity (#591)
Integrity generated from https://www.srihash.org/
Reference: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
2017-01-13 12:15:57 +01:00
Martin von Gagern
4ead46c4ab Describe using auto renderer in html head (#623)
Describe using auto renderer in html head

Motivated by #621.
2017-01-11 21:04:52 +01:00
Martin von Gagern
53e416e296 Revert "Remove trailing commas for IE 9 compatibility"
This reverts commit 4d2e46e7f6.

Having trailing commans makes diffs easier to read as it avoids modifying a
line just to add a trailing comma if there is another item to add at the end
of a list.  There are plans to switch to ES6 notation and to translate that
to ES5 as part of the build process.  Since that translation would remove
trailing commas, the IE9 problems that originally motivated the commit
should vanish soon.
2017-01-11 13:26:00 +01:00
Emily Eisenberg
4d2e46e7f6 Remove trailing commas for IE 9 compatibility
Summary: IE 9 doesn't like trailing commas. When we introduced eslint, we added
a bunch of trailing commas, which makes IE 9 sad.

Test Plan:
 - `make lint`
 - Visit http://localhost:7936/ using IE 9 on browserstack.
 - See that the math loads, and there are no errors in the F12 developer tools.

@kevinb
2017-01-06 19:06:01 -08:00
Viktor Qvarfordt
e4d2d933af Provide link to auto-render.min.js in usage example (#522) 2016-09-17 15:23:26 -07:00
Andrey Mikhaylov (lolmaus)
b120b1c3d8 Fixed indentation in auto-render readme (#481) 2016-05-26 10:10:54 -07:00
Kevin Barabash
14a58adb90 Migrate to eslint
Summary
We'd like contributors to use the same linter and lint rules that we use
internally.  This diff swaps out eslint for jshint and fixes all lint failures
except for the max-len failures in the test suites.

Test Plan:
- ka-lint src
- make lint
- make test

Reviewers: emily
2015-12-01 10:02:08 -08:00
Ben Alpert
b29b8c40ea [auto-render] Don't stop parsing when one expression fails
Summary: Fixes #223.

Test Plan: Opened http://127.0.0.1:7936/contrib/auto-render/, saw `$\unsupported$` in page and error in console, but other expressions rendered. Made test.

Reviewers: emily

Reviewed By: emily

Differential Revision: https://phabricator.khanacademy.org/D17543
2015-04-26 17:04:11 -07:00
Emily Eisenberg
af8c1307f7 Add better lint checking.
Summary:
Make the lint checker check more files. Also, make arc run the
linter.

Test Plan:
 - `arc lint`
 - `make lint`

Reviewers: kevinb, alpert

Reviewed By: alpert

Differential Revision: https://phabricator.khanacademy.org/D17509
2015-04-22 18:55:20 -07:00
Emily Eisenberg
cd9bca4a89 Add basic auto-render extension
Summary:
Add an auto-render extension to render math on a page. It
exposes a global function (maybe we should attach it to `katex`?) to
render math in an element. It comes with a README on how to use it.
Also, make `make build` build the minified file.

Fixes #26

Test Plan:
 - Visit http://localhost:7936/contrib/auto-render/
 - See that all of the math renders correctly
 - `make test`

Reviewers: alpert, kevinb

Reviewed By: kevinb

Differential Revision: https://phabricator.khanacademy.org/D16620
2015-04-01 15:57:10 -07:00