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

Function getBaseElem

static/katex/katex.js:326–344  ·  view source on GitHub ↗
(group)

Source from the content-addressed store, hash-verified

324
325
326var getBaseElem = function getBaseElem(group) {
327 if (group.type === "ordgroup") {
328 if (group.body.length === 1) {
329 return getBaseElem(group.body[0]);
330 } else {
331 return group;
332 }
333 } else if (group.type === "color") {
334 if (group.body.length === 1) {
335 return getBaseElem(group.body[0]);
336 } else {
337 return group;
338 }
339 } else if (group.type === "font") {
340 return getBaseElem(group.body);
341 } else {
342 return group;
343 }
344};
345/**
346 * TeXbook algorithms often reference "character boxes", which are simply groups
347 * with a single character in them. To decide if something is a character box,

Callers 1

utils_isCharacterBoxFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected