Open
Description
Consider the following snippet from a templ template:
<div
class="
flex w-full h-full
justify-center items-center
hover:bg-blue-50
"
>
I often follow this styling to avoid putting very long lists of classes in a single line:
<div
class="flex w-full h-full justify-center items-center hover:bg-blue-50"
>
The length of real class lists in my code is often several times longer.
templ v0.3.833
generates the following Go code:
<div class=\"\n\t\t\t\t\t\t\tflex w-full h-full\n\t\t\t\t\t\t\tjustify-center items-center\n\t\t\t\t\t\t\thover:bg-blue-50\n\t\t\t\t\t\t\">
I believe these line-breaks and tabs serve no purpose and can be stripped.
- This would reduce the size of the generated HTML at runtime.
- ...and make generated code smaller and easier to read.
<div class=\"flex w-full h-full justify-center items-center hover:bg-blue-50\">
Metadata
Assignees
Labels
No labels
Activity