MCPcopy
hub / github.com/ccampbell/rainbow / _getReplacement

Method _getReplacement

src/prism.js:269–272  ·  view source on GitHub ↗
(passedBlock, replaceBlock, matchName)

Source from the content-addressed store, hash-verified

267 * @param {string|null} matchName
268 */
269 const _getReplacement = function(passedBlock, replaceBlock, matchName) {
270 replacement = replaceAtPosition(indexOfGroup(match, groupKey), passedBlock, matchName ? _wrapCodeInSpan(matchName, replaceBlock) : replaceBlock, replacement);
271 return;
272 };
273
274 // If this is a string then this match is directly mapped
275 // to selector so all we have to do is wrap it in a span

Callers

nothing calls this directly

Calls 2

replaceAtPositionFunction · 0.90
indexOfGroupFunction · 0.90

Tested by

no test coverage detected