MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / insertNormalized

Function insertNormalized

docs/components/editor.js:258–261  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

256
257 // Paste/drop pipeline: strip ```python fence, normalise CRLF+tabs, smart-dedent common indent, enforce `MAX_LINES`.
258 const insertNormalized = (raw) => {
259 const norm = unwrapFence(raw).replace(/\r\n?/g, '\n').replace(/\t/g, ' '.repeat(TAB_SIZE));
260 insertAtCaret(dedentCommon(norm));
261 };
262
263 // listeners
264 // One AbortController so destroy() detaches every listener below (jar.destroy sheds only CodeJar's).

Callers 1

createEditorFunction · 0.85

Calls 4

unwrapFenceFunction · 0.85
insertAtCaretFunction · 0.85
dedentCommonFunction · 0.85
repeatMethod · 0.45

Tested by

no test coverage detected