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

Function processLine

lib/web/CodeMirror/src/line/highlight.js:142–151  ·  view source on GitHub ↗
(cm, text, context, startAt)

Source from the content-addressed store, hash-verified

140// update state, but don't save a style array. Used for lines that
141// aren't currently visible.
142export function processLine(cm, text, context, startAt) {
143 let mode = cm.doc.mode
144 let stream = new StringStream(text, cm.options.tabSize, context)
145 stream.start = stream.pos = startAt || 0
146 if (text == "") callBlankLine(mode, context.state)
147 while (!stream.eol()) {
148 readToken(mode, stream, context.state)
149 stream.start = stream.pos
150 }
151}
152
153function callBlankLine(mode, state) {
154 if (mode.blankLine) return mode.blankLine(state)

Callers 3

highlightWorkerFunction · 0.90
getContextBeforeFunction · 0.70
runModeFunction · 0.70

Calls 3

eolMethod · 0.95
callBlankLineFunction · 0.70
readTokenFunction · 0.70

Tested by

no test coverage detected