silverwind

Results 1283 comments of silverwind

Another thing to consider: Will code analysis tools like golangci-lint or govulncheck work in `.templ` files? If not, we must introduce a convention to extract as much logic as possible...

> Anything bigger need to have templates regenerated so a recompliation would be needed. We could make a file structure like `templ/repo/header.templ` which could be overridden with `custom/templ/repo/header.templ` at compile...

Also this begs the question how the filenames and export names should be structured. I think PascalCase all path segements the `templ` directory will be a good idea, so for...

> Add general, instance wide templates for headers/footers We can provide dummy empty templates that render nothing by default. Here for example `templ/custom/page/header.templ`: ```templ package templates templ CustomPageHeader() { nil...

> The person that wants to customise their templates runs a web server Could these remotes also be [file URLs](https://en.wikipedia.org/wiki/File_URI_scheme) like `file:///opt/gitea/custom/mytemplate.templ`? That would avoid the need having to run...

Valid point, I'm sure there will be many regressions and edge-cases with this migration. Doing it "gradually" is even worse because then you have two different template implementations to update...

My main problem with templ is it does not have enough adoption and ecosystem around it. There is for example no Sublime Text plugin so my editing experience would be...

I see it as a benefit that it handles unicode as well. More often than not you want unicode comparison, especially when dealing with user-submitted data.

Looks like there is a ASCII-only variant `ascii.EqualFold`: https://pkg.go.dev/net/http/internal/ascii#EqualFold Not sure if usable because its in `internal` namespace.

`util.AsciiEqualFold` sounds good, we can use it for all the header comparisons. Maybe even open a golang issue so that they make that function part of the public API.