* @returns the Position of the first character on the given line which is not whitespace. * If it's all whitespace, will return the Position of the EOL character.
(
document: vscode.TextDocument,
line: number,
)
| 193 | * If it's all whitespace, will return the Position of the EOL character. |
| 194 | */ |
| 195 | public static getFirstNonWhitespaceCharOnLine( |
| 196 | document: vscode.TextDocument, |
| 197 | line: number, |
| 198 | ): Position { |
| 199 | line = clamp(line, 0, document.lineCount - 1); |
| 200 | return new Position(line, document.lineAt(line).firstNonWhitespaceCharacterIndex); |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Iterate over every line in the block defined by the two positions (Range) passed in. |
no test coverage detected