Microsoft/vscode
Voir sur GitHub[html] Formatting Breaks with Space Between Commented Lines in Script Tag
Open
#213 628 ouverte le 28 mai 2024
bughelp wantedhtml
Métriques du dépôt
- Stars
- (74 848 stars)
- Métriques de merge PR
- (Merge moyen 11h 43m) (1 000 PRs mergées en 30 j)
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: Code 1.89.0 (https://github.com/microsoft/vscode/commit/b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:08:25.066Z)
- OS Version: Linux x64 6.5.0-18-generic
When commenting out sections in a script tag, the HTML formatting breaks if there is a line with at least 1 space in between 2 commented out lines. ( Highlighting the following code block may help clarify. )
<script>
//
//
</script>
Steps to Reproduce:
- Copy and paste the code block shown above into a blank HTML file in vscode.
- Format the HTML using the Format Document command ( keyboard shortcut is usually Ctrl + Shift + I ) .
- Document will not format
- Remove the single space ( not the line ) between the 2 commented out lines.
- Format HTML using same method as Step 2.
- Document should be formatted.