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

Function defaultToken

static/editor.md/lib/codemirror/mode/erlang/erlang.js:562–574  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

560 }
561
562 function defaultToken(state) {
563 var objs = state.tokenStack;
564 var stop = getTokenIndex(objs,"type",["open_paren","separator","keyword"]);
565 var oper = getTokenIndex(objs,"type",["operator"]);
566
567 if (truthy(stop) && truthy(oper) && stop < oper) {
568 return objs[stop+1];
569 } else if (truthy(stop)) {
570 return objs[stop];
571 } else {
572 return false;
573 }
574 }
575
576 function getToken(state,tokens) {
577 var objs = state.tokenStack;

Callers 1

indenterFunction · 0.85

Calls 2

getTokenIndexFunction · 0.85
truthyFunction · 0.85

Tested by

no test coverage detected