MCPcopy Create free account
hub / github.com/bigcode-project/jupytercoder / viewDiffCode

Function viewDiffCode

src/utility.js:399–410  ·  view source on GitHub ↗
(html, activeRequestTextarea)

Source from the content-addressed store, hash-verified

397}
398
399const viewDiffCode = (html, activeRequestTextarea) => {
400 disableCellCode(activeRequestTextarea)
401 const activeCell = activeRequestTextarea.parentElement.parentElement;
402
403 // Due to the need to hide user code, the previous preview logic cannot be used
404 const codeMirrorCode = activeCell.querySelector(".CodeMirror-code")
405 const codeMirrorCodeLine = document.createElement('pre');
406 codeMirrorCodeLine.classList.add("CodeMirror-line", "displayed", "per-insert-code")
407
408 codeMirrorCodeLine.innerHTML = html
409 codeMirrorCode.appendChild(codeMirrorCodeLine)
410}
411
412
413

Callers 1

utility.jsFile · 0.85

Calls 1

disableCellCodeFunction · 0.85

Tested by

no test coverage detected