MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / countCodeLines

Function countCodeLines

packages/app-core/src/lib/code-block-copy.ts:125–129  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

123}
124
125function countCodeLines(text: string): number {
126 const normalized = text.replace(/\r\n/g, '\n').replace(/\r/g, '\n').replace(/\n$/, '')
127 if (!normalized) return 0
128 return normalized.split('\n').length
129}
130
131function codeLanguageLabel(code: HTMLElement): string {
132 const classes = Array.from(code.classList)

Callers 1

summarizeCodeBlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected