MCPcopy
hub / github.com/pandao/editor.md / processLine

Function processLine

lib/codemirror/lib/codemirror.js:6681–6690  ·  view source on GitHub ↗
(cm, text, state, startAt)

Source from the content-addressed store, hash-verified

6679 // update state, but don't save a style array. Used for lines that
6680 // aren't currently visible.
6681 function processLine(cm, text, state, startAt) {
6682 var mode = cm.doc.mode;
6683 var stream = new StringStream(text, cm.options.tabSize);
6684 stream.start = stream.pos = startAt || 0;
6685 if (text == "") callBlankLine(mode, state);
6686 while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {
6687 readToken(mode, stream, state);
6688 stream.start = stream.pos;
6689 }
6690 }
6691
6692 // Convert a style as returned by a mode (either null, or a string
6693 // containing one or more styles) to a CSS style. This is cached,

Callers 3

highlightWorkerFunction · 0.70
getStateBeforeFunction · 0.70
runModeFunction · 0.70

Calls 2

callBlankLineFunction · 0.70
readTokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…