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

Function innerMode

static/editor.md/lib/codemirror/mode/jade/jade.js:491–510  ·  view source on GitHub ↗
(stream, state, force)

Source from the content-addressed store, hash-verified

489 }
490 }
491 function innerMode(stream, state, force) {
492 if (stream.indentation() > state.indentOf || (state.innerModeForLine && !stream.sol()) || force) {
493 if (state.innerMode) {
494 if (!state.innerState) {
495 state.innerState = state.innerMode.startState ? state.innerMode.startState(stream.indentation()) : {};
496 }
497 return stream.hideFirstChars(state.indentOf + 2, function () {
498 return state.innerMode.token(stream, state.innerState) || true;
499 });
500 } else {
501 stream.skipToEnd();
502 return state.indentToken;
503 }
504 } else if (stream.sol()) {
505 state.indentOf = Infinity;
506 state.indentToken = null;
507 state.innerMode = null;
508 state.innerState = null;
509 }
510 }
511 function restOfLine(stream, state) {
512 if (stream.sol()) {
513 // if restOfLine was set at end of line, ignore it

Callers 2

textFunction · 0.85
nextTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected