Skip to content

Commit

Permalink
fix: broken benchmark comment formatting and import
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed Oct 15, 2023
1 parent d917f3d commit 7234951
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion benchmarks/templ/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"strings"
"testing"

_ "embed"

"github.com/a-h/templ/parser/v2"
)

Expand All @@ -27,7 +29,7 @@ func BenchmarkTemplRender(b *testing.B) {
}
}

// go:embed template.templ
//go:embed template.templ
var parserBenchmarkTemplate string

func BenchmarkTemplParser(b *testing.B) {
Expand Down
2 changes: 1 addition & 1 deletion parser/v2/gocommentparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ func (p goMultiLineCommentParser) Parse(pi *parse.Input) (c GoComment, ok bool,
return c, true, nil
}

var goComment = parse.Any(goSingleLineComment, goMultiLineComment)
var goComment = parse.Any[GoComment](goSingleLineComment, goMultiLineComment)

0 comments on commit 7234951

Please sign in to comment.