MCPcopy Index your code
hub / github.com/prettydiff/prettydiff / insert

Function insert

api/mode.ts:581–594  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

579 ".prettydiff_replace{background:#fec;border-color:#a86}"
580 ],
581 insert = function mode_insert():void {
582 const inject:string[] = [`<span class="prettydiff_rendered prettydiff_insert">`];
583 if (json[a + 1][0] === "+") {
584 do {
585 inject.push(json[a][1]);
586 count[1] = count[1] + 1;
587 a = a + 1;
588 } while (json[a + 1][0] === "+");
589 }
590 inject.push(json[a][1]);
591 inject.push("</span>");
592 options.parsed.token[count[0]] = `${inject.join("")} ${options.parsed.token[count[0]]}`;
593 lexers.insert = lexers.insert + 1;
594 },
595 del = function mode_del():void {
596 const symb:string = json[a][0],
597 change:string = (symb === "-")

Callers 1

modeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected