Re includegraphics (#2053)

* Re-enable \includegraphics now that we have trust setting

This reverts commit 5806b240b3.

* Include Khan Academy test logo in repo and use in test (fix #1892)

* Update screenshots

* Update documentation

* Add tests, cleanup existing tests

* Update snapshots

* Enable trust testing (trust=true by default)
This commit is contained in:
Erik Demaine
2019-07-21 11:15:29 -04:00
committed by ylemkimon
parent 223b9c3f24
commit 285c9fe0b6
12 changed files with 111 additions and 41 deletions

View File

@@ -14,7 +14,7 @@ function init() {
input.addEventListener("input", reprocess, false);
permalink.addEventListener("click", setSearch);
const options = {displayMode: true, throwOnError: true};
const options = {displayMode: true, throwOnError: true, trust: true};
const macros = {};
const query = queryString.parse(window.location.search);
@@ -50,6 +50,11 @@ function init() {
}
}
// Use `trust=0` (or `=f`/`=false`/`=n`/`=no`) to not trust input.
if (query.trust && query.trust.match(/^(0|f|n)/)) {
options.trust = false;
}
// The `before` or `pre` search parameter puts normal text before the math.
// The `after` or `post` search parameter puts normal text after the math.
// Example use: testing baseline alignment.