diff --git a/sample/index.templ b/sample/index.templ
new file mode 100644
index 0000000..3e82265
--- /dev/null
+++ b/sample/index.templ
@@ -0,0 +1,13 @@
+package main
+
+templ hello(name string) {
+
Hello, { name }
+}
+
+templ foo(name string) {
+
+ @hello(name)
+
+
+
+}
diff --git a/tests/minimal_init.lua b/tests/minimal_init.lua
index 15f0aab..1c9701d 100644
--- a/tests/minimal_init.lua
+++ b/tests/minimal_init.lua
@@ -73,6 +73,7 @@ function M.setup_treesitter()
"php",
"glimmer",
"rescript",
+ "templ",
"embedded_template",
},
})
diff --git a/tests/specs/close_slash_tag_spec.lua b/tests/specs/close_slash_tag_spec.lua
index 17cd315..3a749cd 100644
--- a/tests/specs/close_slash_tag_spec.lua
+++ b/tests/specs/close_slash_tag_spec.lua
@@ -163,6 +163,42 @@ local data = {
before = [[<%=
]],
after = [[<%=
]],
},
+ {
+ name = "19 templ close tag after inputting /",
+ filepath = "./sample/index.templ",
+ filetype = "templ",
+ linenr = 10,
+ key = [[/]],
+ before = [[
<| ]],
+ after = [[|]],
+ },
+ {
+ name = "20 templ close tag after inputting /",
+ filepath = "./sample/index.templ",
+ filetype = "templ",
+ linenr = 10,
+ key = [[/]],
+ before = [[
<| ]],
+ after = [[|]],
+ },
+ {
+ name = "21 templ don't close tag when no opening tag is found",
+ filepath = "./sample/index.templ",
+ filetype = "templ",
+ linenr = 10,
+ key = [[/>]],
+ before = [[
<|
]],
+ after = [[
>|
]],
+ },
+ {
+ name = "22 templ not close inside quote",
+ filepath = "./sample/index.templ",
+ filetype = "templ",
+ linenr = 10,
+ key = [[/]],
+ before = [[
]],
+ after = [[
]],
+ },
}
local autotag = require("nvim-ts-autotag")
diff --git a/tests/specs/closetag_spec.lua b/tests/specs/closetag_spec.lua
index 1b954b9..a48ee15 100644
--- a/tests/specs/closetag_spec.lua
+++ b/tests/specs/closetag_spec.lua
@@ -201,6 +201,42 @@ local data = {
before = [[<%=