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

Function buildGroup

static/katex/katex.mjs:6453–6474  ·  view source on GitHub ↗
(group, options, baseOptions)

Source from the content-addressed store, hash-verified

6451 */
6452
6453const buildGroup = function buildGroup(group, options, baseOptions) {
6454 if (!group) {
6455 return makeSpan$1();
6456 }
6457
6458 if (_htmlGroupBuilders[group.type]) {
6459 // Call the groupBuilders function
6460 let groupNode = _htmlGroupBuilders[group.type](group, options); // If the size changed between the parent and the current group, account
6461 // for that size difference.
6462
6463 if (baseOptions && options.size !== baseOptions.size) {
6464 groupNode = makeSpan$1(options.sizingClasses(baseOptions), [groupNode], options);
6465 const multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;
6466 groupNode.height *= multiplier;
6467 groupNode.depth *= multiplier;
6468 }
6469
6470 return groupNode;
6471 } else {
6472 throw new ParseError("Got group of unknown type: '" + group.type + "'");
6473 }
6474};
6475/**
6476 * Combine an array of HTML DOM nodes (e.g., the output of `buildExpression`)
6477 * into an unbreakable HTML node of class .base, with proper struts to

Callers 9

buildExpressionFunction · 0.85
htmlBuilderFunction · 0.85
katex.mjsFile · 0.85
htmlBuilder$2Function · 0.85
htmlBuilder$3Function · 0.85
htmlBuilder$5Function · 0.85
htmlBuilder$6Function · 0.85
htmlBuilder$7Function · 0.85
htmlBuilder$8Function · 0.85

Calls 1

sizingClassesMethod · 0.80

Tested by

no test coverage detected