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

Function buildCommon_lookupSymbol

static/katex/katex.js:5288–5299  ·  view source on GitHub ↗
(value, // TODO(#963): Use a union type for this.
fontName, mode)

Source from the content-addressed store, hash-verified

5286 */
5287
5288var buildCommon_lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this.
5289fontName, mode) {
5290 // Replace the value with its replaced value from symbol.js
5291 if (src_symbols[mode][value] && src_symbols[mode][value].replace) {
5292 value = src_symbols[mode][value].replace;
5293 }
5294
5295 return {
5296 value: value,
5297 metrics: getCharacterMetrics(value, fontName, mode)
5298 };
5299};
5300/**
5301 * Makes a symbolNode after translation via the list of symbols in symbols.js.
5302 * Correctly pulls out metrics for the character, and optionally takes a list of

Callers 4

buildCommon_makeSymbolFunction · 0.85
buildCommon_mathsymFunction · 0.85
boldsymbolFunction · 0.85
buildCommon_makeOrdFunction · 0.85

Calls 1

getCharacterMetricsFunction · 0.70

Tested by

no test coverage detected