MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / renderArray

Function renderArray

src/render_latex.mjs:241–249  ·  view source on GitHub ↗
(tokens)

Source from the content-addressed store, hash-verified

239}
240
241function renderArray(tokens) {
242 let result = ""
243 for (let i = 0; i < tokens.length; i++) {
244 let token = tokens[i], f = renderer[token.type]
245 if (!f) throw new Error("No render function for " + token.type)
246 result += f(token, i, tokens, /\n*$/.exec(result)[0].length)
247 }
248 return result
249}
250
251// Move epigraph to the front
252if (noStarch) {

Callers 2

inlineFunction · 0.70
render_latex.mjsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected