MCPcopy Index your code
hub / github.com/marktext/marktext / lineNumbersWrapperHTML

Function lineNumbersWrapperHTML

packages/muya/src/utils/codeBlockLineNumbers.ts:23–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21// The wrapper starts empty; CodeBlockContent.update() syncs spans on demand
22// via `syncLineNumbersSpans` (delta updates, no full innerHTML rewrite).
23export function lineNumbersWrapperHTML(): string {
24 return `<span class="${LINE_NUMBERS_ROWS_CLASS}" contenteditable="false" aria-hidden="true"></span>`;
25}
26
27// Add or remove `<span>` children so wrapper.childElementCount === count.
28// O(delta), not O(count) — typing within a line is free once the count

Callers 2

createCopyNodeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected