Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 24x 14x 14x 16x 6x 14x 24x | /** @returns whitespace margin (spaces/tabs) for single/first line. */
const marginOfFirstLine =
(line: string): string => {
let i = 0
for (; i < line.length; i++) {
if (line[i] !== ' ' && line[i] !== '\t') {
break
}
}
return line.slice(0, i)
}
export default marginOfFirstLine
|