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

Function supsub_htmlBuilderDelegate

static/katex/katex.js:12458–12476  ·  view source on GitHub ↗
(group, options)

Source from the content-addressed store, hash-verified

12456 * handling them itself.
12457 */
12458var supsub_htmlBuilderDelegate = function htmlBuilderDelegate(group, options) {
12459 var base = group.base;
12460
12461 if (!base) {
12462 return null;
12463 } else if (base.type === "op") {
12464 // Operators handle supsubs differently when they have limits
12465 // (e.g. `\displaystyle\sum_2^3`)
12466 var delegate = base.limits && (options.style.size === src_Style.DISPLAY.size || base.alwaysHandleSupSub);
12467 return delegate ? op_htmlBuilder : null;
12468 } else if (base.type === "accent") {
12469 return utils.isCharacterBox(base.base) ? accent_htmlBuilder : null;
12470 } else if (base.type === "horizBrace") {
12471 var isSup = !group.sub;
12472 return isSup === base.isOver ? horizBrace_htmlBuilder : null;
12473 } else {
12474 return null;
12475 }
12476}; // Super scripts and subscripts, whose precise placement can depend on other
12477// functions that precede them.
12478
12479

Callers 1

katex.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected