- VS Code Version: 1.76.0-insider
- OS Version: Windows 11
Using the built-in command vscode.executeFormatDocumentProvider (spec'd here) using an HTML URI can return a range that exceeds the length of the source file.
For example, invoking the above command on a completely empty HTML file will return a range of (startPosition: (0, 0); endPosition: (1, 0)) despite there only being one line in the file. This has caused several bugs to be filed on the Razor team. We've implemented a workaround for now, but we hope to have this issue formally fixed in the near future.