MCPcopy
hub / github.com/tmcw/big / h

Function h

lib/highlight.js:207–230  ·  view source on GitHub ↗
(e, t)

Source from the content-addressed store, hash-verified

205 : ''), (N = Object.create(e, { parent: { value: N } }));
206 }
207 function h(e, t) {
208 if (((E += e), null == t)) return g(), 0;
209 var r = s(t, N);
210 if (r)
211 return r.skip
212 ? (E += t)
213 : (r.eB && (E += t), g(), r.rB || r.eB || (E = t)), _(r, t), r.rB
214 ? 0
215 : t.length;
216 var a = c(N, t);
217 if (a) {
218 var n = N;
219 n.skip ? (E += t) : (n.rE || n.eE || (E += t), g(), n.eE && (E = t));
220 do
221 N.cN && (C += R), N.skip || (M += N.r), (N = N.parent);
222 while (N !== a.parent);
223 return a.starts && _(a.starts, ''), n.rE ? 0 : t.length;
224 }
225 if (o(t, N))
226 throw new Error(
227 'Illegal lexeme "' + t + '" for mode "' + (N.cN || '<unnamed>') + '"'
228 );
229 return (E += t), t.length || 1;
230 }
231 var v = w(e);
232 if (!v) throw new Error('Unknown language: "' + e + '"');
233 u(v);

Callers 1

dFunction · 0.85

Calls 5

gFunction · 0.85
sFunction · 0.85
_Function · 0.85
cFunction · 0.85
oFunction · 0.85

Tested by

no test coverage detected