-
-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode extension: incorrect formatting #192
Comments
I wasn't able to reproduce this on my Mac. I haven't tried on a Linux machine yet. Can you drop an exact copy of the file on the issue please? I'm wondering what character the spaces are. Are they 0x20, or something else? |
Thanks for your investigation! A moment ago I upgraded to VSCode 1.82.3, and the formatting behavior changed on my machine (Windows 10 64-bit). The original file is attached here. Current behavior:
|
Hello, after a sleep, the first issue occurs again (tearing And it seems // package main
// templ Hello() {
// <div>Hello</div>
// }
package main
templ Hello(name string) {
<div>Hello, {name}</div>
} into package main
// package main
// templ Hello() {
// <div>Hello</div>
// }
package main
templ Hello(name string) {
<div>Hello, { name }</div>
}
|
@a-h I can confirm this issue has been fixed in v0.2.408. Thanks for your wonderful work! |
Glad to hear that it's sorted! |
In VSCode v1.82.2 on Windows 10 with templ-vscode v0.0.14, executing the Format Document command repeatedly may mangle the file:
Running
templ fmt
on this file repeatedly doesn't have this issue.The text was updated successfully, but these errors were encountered: