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

Function getBaseElem

static/katex/katex.mjs:200–218  ·  view source on GitHub ↗
(group)

Source from the content-addressed store, hash-verified

198
199
200const getBaseElem = function getBaseElem(group) {
201 if (group.type === "ordgroup") {
202 if (group.body.length === 1) {
203 return getBaseElem(group.body[0]);
204 } else {
205 return group;
206 }
207 } else if (group.type === "color") {
208 if (group.body.length === 1) {
209 return getBaseElem(group.body[0]);
210 } else {
211 return group;
212 }
213 } else if (group.type === "font") {
214 return getBaseElem(group.body);
215 } else {
216 return group;
217 }
218};
219/**
220 * TeXbook algorithms often reference "character boxes", which are simply groups
221 * with a single character in them. To decide if something is a character box,

Callers 1

isCharacterBoxFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected