a-h / templ

A language for writing HTML user interfaces in Go.
https://templ.guide/
MIT License
7.14k stars 236 forks source link

Abandoned change to not modify files where fmt makes no changes #794

Closed hellified closed 1 week ago

hellified commented 2 weeks ago

There was an issue: https://github.com/a-h/templ/issues/128 And a code change: https://github.com/a-h/templ/commit/3d478b3bf49345f0a365843b6507f0cb253b4c55

But it looks as though the change was abandoned? I was hoping either to have the change merged in, since I'm having the same issue as the original issue filer, or learn what the alternative/workaround was.

a-h commented 2 weeks ago

Yeah, I don't know why...

Looks like the design of that section shifted a lot: https://github.com/a-h/templ/blob/8d27ad14edda1cd494729d4cf736022f50fbd9b6/cmd/templ/fmtcmd/main.go#L122-L136

It would need a revisit to make that work, but seems like a reasonable use case to support.

a-h commented 2 weeks ago

See https://github.com/a-h/templ/pull/797

hellified commented 2 weeks ago

Ah, that's wonderful. Just fell through the cracks I guess. Back on track now, so no worries. I'll just watch the PR and anticipate the release. Thanks!