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

Function greedy

static/editor.md/lib/codemirror/mode/erlang/erlang.js:308–323  ·  view source on GitHub ↗
(stream,re,words)

Source from the content-addressed store, hash-verified

306 }
307
308 function greedy(stream,re,words) {
309 if (stream.current().length == 1 && re.test(stream.current())) {
310 while (re.test(stream.peek())) {
311 stream.next();
312 }
313 while (0 < stream.current().length) {
314 if (is_member(stream.current(),words)) {
315 return true;
316 }else{
317 stream.backUp(1);
318 }
319 }
320 stream.next();
321 }
322 return false;
323 }
324
325 function doubleQuote(stream) {
326 return quote(stream, '"', '\\');

Callers 1

tokenizerFunction · 0.85

Calls 1

is_memberFunction · 0.85

Tested by

no test coverage detected