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

Function readToken

static/editor.md/lib/codemirror/lib/codemirror.js:6556–6563  ·  view source on GitHub ↗
(mode, stream, state, inner)

Source from the content-addressed store, hash-verified

6554 }
6555
6556 function readToken(mode, stream, state, inner) {
6557 for (var i = 0; i < 10; i++) {
6558 if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode;
6559 var style = mode.token(stream, state);
6560 if (stream.pos > stream.start) return style;
6561 }
6562 throw new Error("Mode " + mode.name + " failed to advance stream.");
6563 }
6564
6565 // Utility for getTokenAt and getLineTokens
6566 function takeToken(cm, pos, precise, asArray) {

Callers 3

takeTokenFunction · 0.70
runModeFunction · 0.70
processLineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected