(text: string)
| 123 | } |
| 124 | |
| 125 | function 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 | |
| 131 | function codeLanguageLabel(code: HTMLElement): string { |
| 132 | const classes = Array.from(code.classList) |
no outgoing calls
no test coverage detected