diff --git a/benchmarks/templ/template_templ.go b/benchmarks/templ/template_templ.go
index 641503698..9a3d02ac3 100644
--- a/benchmarks/templ/template_templ.go
+++ b/benchmarks/templ/template_templ.go
@@ -10,99 +10,99 @@ import "io"
import "bytes"
func Render(p Person) templ.Component {
- return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
- templBuffer, templIsBuffer := w.(*bytes.Buffer)
- if !templIsBuffer {
- templBuffer = templ.GetBuffer()
- defer templ.ReleaseBuffer(templBuffer)
- }
- ctx = templ.InitializeContext(ctx)
- var_1 := templ.GetChildren(ctx)
- if var_1 == nil {
- var_1 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
- _, err = templBuffer.WriteString("
")
- if err != nil {
- return err
- }
- var var_2 string = p.Name
- _, err = templBuffer.WriteString(templ.EscapeString(var_2))
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString("
`))
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString("\">
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string = p.Name
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
`))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">
")
- if err != nil {
- return err
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(">
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
}
- if !templIsBuffer {
- _, err = templBuffer.WriteTo(w)
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
}
- return err
+ return templ_7745c5c3_Err
})
}
diff --git a/cmd/templ/lspcmd/httpdebug/list_templ.go b/cmd/templ/lspcmd/httpdebug/list_templ.go
index 2269c6df9..3d008f9fd 100644
--- a/cmd/templ/lspcmd/httpdebug/list_templ.go
+++ b/cmd/templ/lspcmd/httpdebug/list_templ.go
@@ -10,125 +10,125 @@ import "io"
import "bytes"
func list(uris []string) templ.Component {
- return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
- templBuffer, templIsBuffer := w.(*bytes.Buffer)
- if !templIsBuffer {
- templBuffer = templ.GetBuffer()
- defer templ.ReleaseBuffer(templBuffer)
+ return templ.ComponentFunc(func(templ_7745c5c3_Ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
+ if !templ_7745c5c3_IsBuffer {
+ templ_7745c5c3_Buffer = templ.GetBuffer()
+ defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
- ctx = templ.InitializeContext(ctx)
- var_1 := templ.GetChildren(ctx)
- if var_1 == nil {
- var_1 = templ.NopComponent
+ templ_7745c5c3_Ctx = templ.InitializeContext(templ_7745c5c3_Ctx)
+ templ_7745c5c3_Var1 := templ.GetChildren(templ_7745c5c3_Ctx)
+ if templ_7745c5c3_Var1 == nil {
+ templ_7745c5c3_Var1 = templ.NopComponent
}
- ctx = templ.ClearChildren(ctx)
- _, err = templBuffer.WriteString("")
- if err != nil {
- return err
+ templ_7745c5c3_Ctx = templ.ClearChildren(templ_7745c5c3_Ctx)
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
}
- var_2 := `File`
- _, err = templBuffer.WriteString(var_2)
- if err != nil {
- return err
+ templ_7745c5c3_Var2 := `File`
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
}
- _, err = templBuffer.WriteString(" | | | | | ")
- if err != nil {
- return err
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | | | | ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
}
for _, uri := range uris {
- _, err = templBuffer.WriteString("")
- if err != nil {
- return err
- }
- var var_3 string = uri
- _, err = templBuffer.WriteString(templ.EscapeString(var_3))
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString(" | ")
- if err != nil {
- return err
- }
- var_5 := `Mapping`
- _, err = templBuffer.WriteString(var_5)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString(" | ")
- if err != nil {
- return err
- }
- var_7 := `Source Map`
- _, err = templBuffer.WriteString(var_7)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString(" | ")
- if err != nil {
- return err
- }
- var_9 := `Templ`
- _, err = templBuffer.WriteString(var_9)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString(" | ")
- if err != nil {
- return err
- }
- var_11 := `Go`
- _, err = templBuffer.WriteString(var_11)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString(" | ")
- if err != nil {
- return err
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string = uri
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var5 := `Mapping`
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var5)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var7 := `Source Map`
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var9 := `Templ`
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var11 := `Go`
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
}
}
- _, err = templBuffer.WriteString(" ")
- if err != nil {
- return err
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" |
---|
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
}
- if !templIsBuffer {
- _, err = templBuffer.WriteTo(w)
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
}
- return err
+ return templ_7745c5c3_Err
})
}
diff --git a/cmd/templ/visualize/sourcemapvisualisation_templ.go b/cmd/templ/visualize/sourcemapvisualisation_templ.go
index 67f557e14..72cfe6bcf 100644
--- a/cmd/templ/visualize/sourcemapvisualisation_templ.go
+++ b/cmd/templ/visualize/sourcemapvisualisation_templ.go
@@ -11,160 +11,160 @@ import "bytes"
import "strings"
func row() templ.CSSClass {
- var templCSSBuilder strings.Builder
- templCSSBuilder.WriteString(`display:flex;`)
- templCSSID := templ.CSSID(`row`, templCSSBuilder.String())
+ var templ_7745c5c3_CSSBuilder strings.Builder
+ templ_7745c5c3_CSSBuilder.WriteString(`display:flex;`)
+ templ_7745c5c3_CSSID := templ.CSSID(`row`, templ_7745c5c3_CSSBuilder.String())
return templ.ComponentCSSClass{
- ID: templCSSID,
- Class: templ.SafeCSS(`.` + templCSSID + `{` + templCSSBuilder.String() + `}`),
+ ID: templ_7745c5c3_CSSID,
+ Class: templ.SafeCSS(`.` + templ_7745c5c3_CSSID + `{` + templ_7745c5c3_CSSBuilder.String() + `}`),
}
}
func column() templ.CSSClass {
- var templCSSBuilder strings.Builder
- templCSSBuilder.WriteString(`flex:50%;`)
- templCSSBuilder.WriteString(`overflow-y:scroll;`)
- templCSSBuilder.WriteString(`max-height:100vh;`)
- templCSSID := templ.CSSID(`column`, templCSSBuilder.String())
+ var templ_7745c5c3_CSSBuilder strings.Builder
+ templ_7745c5c3_CSSBuilder.WriteString(`flex:50%;`)
+ templ_7745c5c3_CSSBuilder.WriteString(`overflow-y:scroll;`)
+ templ_7745c5c3_CSSBuilder.WriteString(`max-height:100vh;`)
+ templ_7745c5c3_CSSID := templ.CSSID(`column`, templ_7745c5c3_CSSBuilder.String())
return templ.ComponentCSSClass{
- ID: templCSSID,
- Class: templ.SafeCSS(`.` + templCSSID + `{` + templCSSBuilder.String() + `}`),
+ ID: templ_7745c5c3_CSSID,
+ Class: templ.SafeCSS(`.` + templ_7745c5c3_CSSID + `{` + templ_7745c5c3_CSSBuilder.String() + `}`),
}
}
func code() templ.CSSClass {
- var templCSSBuilder strings.Builder
- templCSSBuilder.WriteString(`font-family:monospace;`)
- templCSSID := templ.CSSID(`code`, templCSSBuilder.String())
+ var templ_7745c5c3_CSSBuilder strings.Builder
+ templ_7745c5c3_CSSBuilder.WriteString(`font-family:monospace;`)
+ templ_7745c5c3_CSSID := templ.CSSID(`code`, templ_7745c5c3_CSSBuilder.String())
return templ.ComponentCSSClass{
- ID: templCSSID,
- Class: templ.SafeCSS(`.` + templCSSID + `{` + templCSSBuilder.String() + `}`),
+ ID: templ_7745c5c3_CSSID,
+ Class: templ.SafeCSS(`.` + templ_7745c5c3_CSSID + `{` + templ_7745c5c3_CSSBuilder.String() + `}`),
}
}
func combine(templFileName string, left, right templ.Component) templ.Component {
- return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
- templBuffer, templIsBuffer := w.(*bytes.Buffer)
- if !templIsBuffer {
- templBuffer = templ.GetBuffer()
- defer templ.ReleaseBuffer(templBuffer)
- }
- ctx = templ.InitializeContext(ctx)
- var_1 := templ.GetChildren(ctx)
- if var_1 == nil {
- var_1 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
- _, err = templBuffer.WriteString("")
- if err != nil {
- return err
- }
- var var_2 string = templFileName
- _, err = templBuffer.WriteString(templ.EscapeString(var_2))
- if err != nil {
- return err
- }
- var_3 := `- Source Map Visualisation`
- _, err = templBuffer.WriteString(var_3)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString("")
- if err != nil {
- return err
- }
- var var_5 string = templFileName
- _, err = templBuffer.WriteString(templ.EscapeString(var_5))
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString("
")
- if err != nil {
- return err
- }
- var var_6 = []any{templ.Classes(row())}
- err = templ.RenderCSSItems(ctx, templBuffer, var_6...)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString("")
- if err != nil {
- return err
- }
- var var_7 = []any{templ.Classes(column(), code())}
- err = templ.RenderCSSItems(ctx, templBuffer, var_7...)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString("
")
- if err != nil {
- return err
- }
- err = left.Render(ctx, templBuffer)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString("
")
- if err != nil {
- return err
- }
- var var_8 = []any{templ.Classes(column(), code())}
- err = templ.RenderCSSItems(ctx, templBuffer, var_8...)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString("
")
- if err != nil {
- return err
- }
- err = right.Render(ctx, templBuffer)
- if err != nil {
- return err
- }
- _, err = templBuffer.WriteString("
")
- if err != nil {
- return err
- }
- if !templIsBuffer {
- _, err = templBuffer.WriteTo(w)
- }
- return err
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var5 string = templFileName
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var6 = []any{templ.Classes(row())}
+ templ_7745c5c3_Err = templ.RenderCSSItems(templ_7745c5c3_Ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var6...)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var7 = []any{templ.Classes(column(), code())}
+ templ_7745c5c3_Err = templ.RenderCSSItems(templ_7745c5c3_Ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var7...)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = left.Render(templ_7745c5c3_Ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var8 = []any{templ.Classes(column(), code())}
+ templ_7745c5c3_Err = templ.RenderCSSItems(templ_7745c5c3_Ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var8...)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = right.Render(templ_7745c5c3_Ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("