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

Function maybe_drop_pre

static/editor.md/lib/codemirror/mode/erlang/erlang.js:425–437  ·  view source on GitHub ↗
(s,token)

Source from the content-addressed store, hash-verified

423 }
424
425 function maybe_drop_pre(s,token) {
426 var last = s.length-1;
427
428 if (0 < last && s[last].type === "record" && token.type === "dot") {
429 s.pop();
430 }else if (0 < last && s[last].type === "group") {
431 s.pop();
432 s.push(token);
433 }else{
434 s.push(token);
435 }
436 return s;
437 }
438
439 function maybe_drop_post(s) {
440 var last = s.length-1;

Callers 1

pushTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected