mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user