Skip to content

Commit

Permalink
Add comment for WriteExtractedString
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenafamo committed Jan 4, 2024
1 parent e7e4c96 commit df75324
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ func ToGoHTML(ctx context.Context, c Component) (s template.HTML, err error) {
return
}

// WriteExtractedString is used when rendering templates in development mode.
// the generator would have written non-go code to the _templ.txt file, which
// is then read by this function and written to the output.
func WriteExtractedString(w *bytes.Buffer, lineNum int) error {
_, path, _, _ := runtime.Caller(1)
if !strings.HasSuffix(path, "_templ.go") {
Expand Down

0 comments on commit df75324

Please sign in to comment.