From 2a7278c5acde711b7506f0e59b561c90364e0adc Mon Sep 17 00:00:00 2001 From: Adrian Hesketh Date: Thu, 27 Jun 2024 13:05:45 +0100 Subject: [PATCH] refactor: add extra test --- .version | 2 +- .../testdata/commentsbeforepackage.txtar | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 cmd/templ/imports/testdata/commentsbeforepackage.txtar diff --git a/.version b/.version index d26f8f48a..674a94aaa 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.2.728 \ No newline at end of file +0.2.729 \ No newline at end of file diff --git a/cmd/templ/imports/testdata/commentsbeforepackage.txtar b/cmd/templ/imports/testdata/commentsbeforepackage.txtar new file mode 100644 index 000000000..8585dc273 --- /dev/null +++ b/cmd/templ/imports/testdata/commentsbeforepackage.txtar @@ -0,0 +1,28 @@ +-- fmt_templ.templ -- +// Comments before. +/* + Some more comments +*/ +package test + +templ test() { +
Hello
+} + +// Comment on variable or function. +var x = fmt.Sprintf("Hello") +-- fmt_templ.templ -- +// Comments before. +/* + Some more comments +*/ +package test + +import "fmt" + +templ test() { +
Hello
+} + +// Comment on variable or function. +var x = fmt.Sprintf("Hello")