MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / local

Function local

lib/web/CodeMirror/mode/markdown/markdown.js:299–321  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

297 }
298
299 function local(stream, state) {
300 var currListInd = state.listStack[state.listStack.length - 1] || 0;
301 var hasExitedList = state.indentation < currListInd;
302 var maxFencedEndInd = currListInd + 3;
303 if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {
304 if (modeCfg.highlightFormatting) state.formatting = "code-block";
305 var returnType;
306 if (!hasExitedList) returnType = getType(state)
307 state.localMode = state.localState = null;
308 state.block = blockNormal;
309 state.f = inlineNormal;
310 state.fencedEndRE = null;
311 state.code = 0
312 state.thisLine.fencedCodeEnd = true;
313 if (hasExitedList) return switchBlock(stream, state, state.block);
314 return returnType;
315 } else if (state.localMode) {
316 return state.localMode.token(stream, state.localState);
317 } else {
318 stream.skipToEnd();
319 return tokenTypes.code;
320 }
321 }
322
323 // Inline
324 function getType(state) {

Callers

nothing calls this directly

Calls 4

getTypeFunction · 0.85
switchBlockFunction · 0.85
skipToEndMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected