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

Function tokenUntil

static/editor.md/lib/codemirror/mode/soy/soy.js:33–46  ·  view source on GitHub ↗
(stream, state, untilRegExp)

Source from the content-addressed store, hash-verified

31 }
32
33 function tokenUntil(stream, state, untilRegExp) {
34 var oldString = stream.string;
35 var match = untilRegExp.exec(oldString.substr(stream.pos));
36 if (match) {
37 // We don't use backUp because it backs up just the position, not the state.
38 // This uses an undocumented API.
39 stream.string = oldString.substr(0, stream.pos + match.index);
40 }
41 var result = stream.hideFirstChars(state.indent, function() {
42 return state.localMode.token(stream, state.localState);
43 });
44 stream.string = oldString;
45 return result;
46 }
47
48 return {
49 startState: function() {

Callers 1

soy.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected