You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before you begin
Please make sure you're using the latest version of the templ CLI (go install github.com/a-h/templ/cmd/templ@latest), and have upgraded your project to use the latest version of the templ runtime (go get -u github.com/a-h/templ@latest)
Describe the bug
The following template:
<pre>
command line 1;
command line 2;
</pre>
is rendered to
<pre>command line 1; command line 2;</pre>
which is incorrect as the pre tag exists to make white space significant.
To Reproduce
go.mod
module templ.demo
go 1.23.1
require github.com/a-h/templ v0.2.778 // direct
Expected behavior
The whitespaces inside <pre> and </pre> should be kept as is:
<pre>
command line 1;
command line 2;
</pre>
Screenshots
N/A
Logs
N/A
templ info output
Run templ info and include the output.
(✓) os [ goos=linux goarch=amd64 ]
(✓) go [ location=/usr/local/bin/go version=go version go1.23.1 linux/amd64 ]
(✗) gopls [ location= version= message=failed to find gopls: cannot find gopls on the path (REDACTED), in $HOME/go/bin or $HOME/.local/bin/gopls. You can install gopls with go install golang.org/x/tools/gopls@latest ]
(✓) templ [ location=/usr/local/bin/templ version=v0.2.778 ]
Desktop (please complete the following information):
Before you begin
Please make sure you're using the latest version of the templ CLI (
go install github.com/a-h/templ/cmd/templ@latest
), and have upgraded your project to use the latest version of the templ runtime (go get -u github.com/a-h/templ@latest
)Describe the bug
The following template:
is rendered to
which is incorrect as the pre tag exists to make white space significant.
To Reproduce
go.mod
go.sum
demo.templ
main.go
Run main and cat "demo.html"
Expected behavior
The whitespaces inside
<pre>
and</pre>
should be kept as is:Screenshots
N/A
Logs
N/A
templ info
outputRun
templ info
and include the output.(✓) os [ goos=linux goarch=amd64 ]
(✓) go [ location=/usr/local/bin/go version=go version go1.23.1 linux/amd64 ]
(✗) gopls [ location= version= message=failed to find gopls: cannot find gopls on the path (REDACTED), in $HOME/go/bin or $HOME/.local/bin/gopls. You can install gopls with
go install golang.org/x/tools/gopls@latest
](✓) templ [ location=/usr/local/bin/templ version=v0.2.778 ]
Desktop (please complete the following information):
templ version
): v0.2.778go version
): go version go1.23.1 linux/amd64gopls
version (gopls version
): N/AAdditional context
N/A
The text was updated successfully, but these errors were encountered: