MCPcopy Index your code
hub / github.com/documentcloud/visualsearch / eatModeChunk

Function eatModeChunk

docs/assets/highlight.js:206–217  ·  view source on GitHub ↗
(value, index)

Source from the content-addressed store, hash-verified

204 }
205
206 function eatModeChunk(value, index) {
207 var mode = modes[modes.length - 1];
208 if (!mode.terminators) {
209 mode.terminators = compileTerminators(mode, language);
210 }
211 mode.terminators.lastIndex = index;
212 var match = mode.terminators.exec(value);
213 if (match)
214 return [value.substr(index, match.index - index), match[0], false];
215 else
216 return [value.substr(index), '', true];
217 }
218
219 function keywordMatch(mode, match) {
220 var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0]

Callers 1

highlightFunction · 0.85

Calls 1

compileTerminatorsFunction · 0.85

Tested by

no test coverage detected