MCPcopy Create free account
hub / github.com/TruthHun/BookStack / constructor

Method constructor

static/katex/katex.mjs:261–286  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

259 */
260class Settings {
261 constructor(options) {
262 this.displayMode = void 0;
263 this.leqno = void 0;
264 this.fleqn = void 0;
265 this.throwOnError = void 0;
266 this.errorColor = void 0;
267 this.macros = void 0;
268 this.colorIsTextColor = void 0;
269 this.strict = void 0;
270 this.maxSize = void 0;
271 this.maxExpand = void 0;
272 this.allowedProtocols = void 0;
273 // allow null options
274 options = options || {};
275 this.displayMode = utils.deflt(options.displayMode, false);
276 this.leqno = utils.deflt(options.leqno, false);
277 this.fleqn = utils.deflt(options.fleqn, false);
278 this.throwOnError = utils.deflt(options.throwOnError, true);
279 this.errorColor = utils.deflt(options.errorColor, "#cc0000");
280 this.macros = options.macros || {};
281 this.colorIsTextColor = utils.deflt(options.colorIsTextColor, false);
282 this.strict = utils.deflt(options.strict, "warn");
283 this.maxSize = Math.max(0, utils.deflt(options.maxSize, Infinity));
284 this.maxExpand = Math.max(0, utils.deflt(options.maxExpand, 1000));
285 this.allowedProtocols = utils.deflt(options.allowedProtocols, ["http", "https", "mailto", "_relative"]);
286 }
287 /**
288 * Report nonstrict (non-LaTeX-compatible) input.
289 * Can safely not be called if `this.strict` is false in JavaScript.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected