Executing vscode.executeFormatDocumentProvider
with HTML files can return end range exceeding file length
#175298
Labels
formatting
Source formatter issues
under-discussion
Issue is under discussion for relevance, priority, approach
Does this issue occur when all extensions are disabled?: Yes
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.
The text was updated successfully, but these errors were encountered: