MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getLeadingWhitespaceLength

Function getLeadingWhitespaceLength

src/cm/indentGuides.ts:89–99  ·  view source on GitHub ↗

* Count the leading indentation characters of a line.

(line: string)

Source from the content-addressed store, hash-verified

87 * Count the leading indentation characters of a line.
88 */
89function getLeadingWhitespaceLength(line: string): number {
90 let count = 0;
91 for (const ch of line) {
92 if (ch === " " || ch === "\t") {
93 count++;
94 continue;
95 }
96 break;
97 }
98 return count;
99}
100
101function buildGuideStyle(levels: number, guideStepPx: number): string {
102 const images = [];

Callers 1

getCachedLineInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected