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

Function lookupSymbol

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

Source from the content-addressed store, hash-verified

5260 */
5261
5262const lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this.
5263fontName, mode) {
5264 // Replace the value with its replaced value from symbol.js
5265 if (symbols[mode][value] && symbols[mode][value].replace) {
5266 value = symbols[mode][value].replace;
5267 }
5268
5269 return {
5270 value: value,
5271 metrics: getCharacterMetrics(value, fontName, mode)
5272 };
5273};
5274/**
5275 * Makes a symbolNode after translation via the list of symbols in symbols.js.
5276 * Correctly pulls out metrics for the character, and optionally takes a list of

Callers 4

makeSymbolFunction · 0.85
mathsymFunction · 0.85
boldsymbolFunction · 0.85
makeOrdFunction · 0.85

Calls 1

getCharacterMetricsFunction · 0.70

Tested by

no test coverage detected