Changed: DB Params
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div><p>{ "the" }<a href="http://example.com">{ "data" }
|
||||
</a></p></div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div>
|
||||
<p>
|
||||
{ "the" }
|
||||
<a href="http://example.com">
|
||||
{ "data" }
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div><p>{ "the" }<a href="http://example.com">{ "data" } </a></p></div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div><p>{ "the" }<a href="http://example.com">{ "data" } </a></p></div>
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ test() {
|
||||
<div>Linebreaks<br/>used<br/>for<br/>spacing</div>
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ test() {
|
||||
<div>Linebreaks<br/>used<br/>for<br/>spacing</div>
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ test() {
|
||||
<div>
|
||||
Linebreaks<br/>and<hr/>rules<br/>for<br/>spacing
|
||||
</div>
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ test() {
|
||||
<div>
|
||||
Linebreaks
|
||||
<br/>
|
||||
and
|
||||
<hr/>
|
||||
rules
|
||||
<br/>
|
||||
for
|
||||
<br/>
|
||||
spacing
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div><p>{ "the" }<a href="http://example.com">{ "data" }</a></p>
|
||||
</div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div>
|
||||
<p>{ "the" }<a href="http://example.com">{ "data" }</a></p>
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div>
|
||||
<p>{ "the" }<a href="http://example.com">{ "data" }</a></p></div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div>
|
||||
<p>{ "the" }<a href="http://example.com">{ "data" }</a></p>
|
||||
</div>
|
||||
}
|
24
templ/parser/v2/formattestdata/comments_are_preserved.txt
Normal file
24
templ/parser/v2/formattestdata/comments_are_preserved.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ test() {
|
||||
<!-- This is a comment -->
|
||||
// This is not included in the output.
|
||||
<div>Some standard templ</div>
|
||||
/* This is not included in the output too. */
|
||||
/*
|
||||
Leave this alone.
|
||||
*/
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ test() {
|
||||
<!-- This is a comment -->
|
||||
// This is not included in the output.
|
||||
<div>Some standard templ</div>
|
||||
/* This is not included in the output too. */
|
||||
/*
|
||||
Leave this alone.
|
||||
*/
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ conditionalAttributes(addClass bool) {
|
||||
<div id="conditional"
|
||||
if addClass {
|
||||
class="itWasTrue"
|
||||
}
|
||||
>
|
||||
Content</div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ conditionalAttributes(addClass bool) {
|
||||
<div
|
||||
id="conditional"
|
||||
if addClass {
|
||||
class="itWasTrue"
|
||||
}
|
||||
>
|
||||
Content
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ conditionalAttributes(addClass bool) {
|
||||
<div id="conditional" if addClass {
|
||||
class="itWasTrue"
|
||||
}
|
||||
width="300">Content</div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ conditionalAttributes(addClass bool) {
|
||||
<div
|
||||
id="conditional"
|
||||
if addClass {
|
||||
class="itWasTrue"
|
||||
}
|
||||
width="300"
|
||||
>Content</div>
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ conditionalAttributes(addClass bool) {
|
||||
<div id="conditional"
|
||||
if addClass {
|
||||
class="itWasTrue"
|
||||
}
|
||||
width="300">Content</div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ conditionalAttributes(addClass bool) {
|
||||
<div
|
||||
id="conditional"
|
||||
if addClass {
|
||||
class="itWasTrue"
|
||||
}
|
||||
width="300"
|
||||
>Content</div>
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ conditionalAttributes(addClass bool) {
|
||||
<div id="conditional"
|
||||
if addClass {
|
||||
class="itWasTrue"
|
||||
} else {
|
||||
class="itWasNotTrue"
|
||||
}
|
||||
width="300">Content</div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ conditionalAttributes(addClass bool) {
|
||||
<div
|
||||
id="conditional"
|
||||
if addClass {
|
||||
class="itWasTrue"
|
||||
} else {
|
||||
class="itWasNotTrue"
|
||||
}
|
||||
width="300"
|
||||
>Content</div>
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ nested() {
|
||||
<div class="double">double</div>
|
||||
<div class='single-not-required'>single-not-required</div>
|
||||
<div data-value='{"data":"value"}'>single-required</div>
|
||||
}
|
||||
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ nested() {
|
||||
<div class="double">double</div>
|
||||
<div class="single-not-required">single-not-required</div>
|
||||
<div data-value='{"data":"value"}'>single-required</div>
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
css ClassName() {
|
||||
background-color: #ffffff;
|
||||
color: { constants.White };
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
css ClassName() {
|
||||
background-color: #ffffff;
|
||||
color: { constants.White };
|
||||
}
|
15
templ/parser/v2/formattestdata/css_whitespace_is_tidied.txt
Normal file
15
templ/parser/v2/formattestdata/css_whitespace_is_tidied.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
css ClassName() {
|
||||
background-color : #ffffff ;
|
||||
color : { constants.White };
|
||||
}
|
||||
|
||||
-- out --
|
||||
package test
|
||||
|
||||
css ClassName() {
|
||||
background-color: #ffffff;
|
||||
color: { constants.White };
|
||||
}
|
24
templ/parser/v2/formattestdata/cssarguments_multiline.txt
Normal file
24
templ/parser/v2/formattestdata/cssarguments_multiline.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
css Style(
|
||||
a string,
|
||||
b string,
|
||||
c string,
|
||||
) {
|
||||
color: {a};
|
||||
background-color: {b};
|
||||
border-color: {c};
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
css Style(
|
||||
a string,
|
||||
b string,
|
||||
c string,
|
||||
) {
|
||||
color: { a };
|
||||
background-color: { b };
|
||||
border-color: { c };
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div>
|
||||
<p></p>
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(items []string) {
|
||||
<div>{ "the" }<div>{ "other" }</div>for _, item := range items {
|
||||
<div>{ item }</div>
|
||||
}</div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(items []string) {
|
||||
<div>
|
||||
{ "the" }
|
||||
<div>{ "other" }</div>
|
||||
for _, item := range items {
|
||||
<div>{ item }</div>
|
||||
}
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ nested() {
|
||||
<div>{ "the" }<div>{ "other" }</div></div>
|
||||
}
|
||||
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ nested() {
|
||||
<div>{ "the" }<div>{ "other" }</div></div>
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
type Link struct {
|
||||
Name string
|
||||
Url string
|
||||
}
|
||||
|
||||
var a = false;
|
||||
|
||||
func test() {
|
||||
log.Print("hoi")
|
||||
|
||||
if (a) {
|
||||
log.Fatal("OH NO !")
|
||||
}
|
||||
}
|
||||
|
||||
templ x() {
|
||||
<div>Hello World</div>
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
type Link struct {
|
||||
Name string
|
||||
Url string
|
||||
}
|
||||
|
||||
var a = false
|
||||
|
||||
func test() {
|
||||
log.Print("hoi")
|
||||
|
||||
if a {
|
||||
log.Fatal("OH NO !")
|
||||
}
|
||||
}
|
||||
|
||||
templ x() {
|
||||
<div>Hello World</div>
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
// test the comment handling.
|
||||
templ test() {
|
||||
Test
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
// test the comment handling.
|
||||
templ test() {
|
||||
Test
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(items []string) {
|
||||
<div>{ "the" }<div>{ "other" }</div>if items != nil {
|
||||
<div>{ items[0] }</div>
|
||||
} else {
|
||||
<div>{ items[1] }</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(items []string) {
|
||||
<div>
|
||||
{ "the" }
|
||||
<div>{ "other" }</div>
|
||||
if items != nil {
|
||||
<div>{ items[0] }</div>
|
||||
} else {
|
||||
<div>{ items[1] }</div>
|
||||
}
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ test() {
|
||||
<p>
|
||||
In a flowing <strong>paragraph</strong>, you can use inline elements.
|
||||
These <strong>inline elements</strong> can be <strong>styled</strong>
|
||||
and are not placed on new lines.
|
||||
</p>
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ test() {
|
||||
<p>
|
||||
In a flowing <strong>paragraph</strong>, you can use inline elements.
|
||||
These <strong>inline elements</strong> can be <strong>styled</strong>
|
||||
and are not placed on new lines.
|
||||
</p>
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
@something(`Hi
|
||||
some cool text
|
||||
|
||||
foo
|
||||
|
||||
bar
|
||||
|
||||
`)
|
||||
@something(`
|
||||
something
|
||||
`,
|
||||
`
|
||||
something
|
||||
`,
|
||||
)
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
@something(`Hi
|
||||
some cool text
|
||||
|
||||
foo
|
||||
|
||||
bar
|
||||
|
||||
`)
|
||||
@something(`
|
||||
something
|
||||
`,
|
||||
`
|
||||
something
|
||||
`,
|
||||
)
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div><div><b>Text</b></div></div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div><div><b>Text</b></div></div>
|
||||
}
|
12
templ/parser/v2/formattestdata/raw_go_is_formatted.txt
Normal file
12
templ/parser/v2/formattestdata/raw_go_is_formatted.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ nameList(items []Item) {
|
||||
{{ first := items[0] }}
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ nameList(items []Item) {
|
||||
{{ first := items[0] }}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<script src="https://example.com/myscript.js"></script>
|
||||
}
|
||||
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<script src="https://example.com/myscript.js"></script>
|
||||
}
|
20
templ/parser/v2/formattestdata/scriptarguments_multiline.txt
Normal file
20
templ/parser/v2/formattestdata/scriptarguments_multiline.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
script Style(
|
||||
a string,
|
||||
b string,
|
||||
c string,
|
||||
) {
|
||||
console.log(a, b, c);
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
script Style(
|
||||
a string,
|
||||
b string,
|
||||
c string,
|
||||
) {
|
||||
console.log(a, b, c);
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
<div>{firstName} {lastName}</div>
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
<div>{ firstName } { lastName }</div>
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
<div>{pt1}{pt2}</div>
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
<div>{ pt1 }{ pt2 }</div>
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
<div>{firstName...} {lastName...}</div>
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
<div>{ firstName... } { lastName... }</div>
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(items []string) {
|
||||
<div>{ "the" }<div>{ "other" }</div>switch items[0] {
|
||||
case "a":
|
||||
<div>{ items[0] }</div>
|
||||
case "b":
|
||||
<div>{ items[1] }</div>
|
||||
}</div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(items []string) {
|
||||
<div>
|
||||
{ "the" }
|
||||
<div>{ "other" }</div>
|
||||
switch items[0] {
|
||||
case "a":
|
||||
<div>{ items[0] }</div>
|
||||
case "b":
|
||||
<div>{ items[1] }</div>
|
||||
}
|
||||
</div>
|
||||
}
|
30
templ/parser/v2/formattestdata/tables_are_formatted_well.txt
Normal file
30
templ/parser/v2/formattestdata/tables_are_formatted_well.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ table(accountNumber string, registration string) {
|
||||
<table>
|
||||
<tr>
|
||||
<th width="20%">Your account number</th>
|
||||
<td width="80%">{ accountNumber }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Registration</td>
|
||||
<td>{ strings.ToUpper(registration) }</td>
|
||||
</tr>
|
||||
</table>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ table(accountNumber string, registration string) {
|
||||
<table>
|
||||
<tr>
|
||||
<th width="20%">Your account number</th>
|
||||
<td width="80%">{ accountNumber }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Registration</td>
|
||||
<td>{ strings.ToUpper(registration) }</td>
|
||||
</tr>
|
||||
</table>
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ x(id string, class string) {
|
||||
<button
|
||||
id={id}
|
||||
name={
|
||||
"name"
|
||||
}
|
||||
class={
|
||||
"blue",
|
||||
class,
|
||||
map[string]bool{
|
||||
"a": true,
|
||||
},
|
||||
}
|
||||
></button>
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ x(id string, class string) {
|
||||
<button
|
||||
id={ id }
|
||||
name={ "name" }
|
||||
class={
|
||||
"blue",
|
||||
class,
|
||||
map[string]bool{
|
||||
"a": true,
|
||||
},
|
||||
}
|
||||
></button>
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
-- in --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
<li>
|
||||
<a href="/">
|
||||
Home
|
||||
@hello("home") {
|
||||
data
|
||||
}
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
-- out --
|
||||
package main
|
||||
|
||||
templ x() {
|
||||
<li>
|
||||
<a href="/">
|
||||
Home
|
||||
@hello("home") {
|
||||
data
|
||||
}
|
||||
</a>
|
||||
</li>
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
templ List(
|
||||
list1 list[item],
|
||||
list2 list[item],
|
||||
list3 list[item],
|
||||
) {
|
||||
<div></div>
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
templ List(
|
||||
list1 list[item],
|
||||
list2 list[item],
|
||||
list3 list[item],
|
||||
) {
|
||||
<div></div>
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
-- in --
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
||||
|
||||
-- out --
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
-- in --
|
||||
// Go comment
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
||||
-- out --
|
||||
// Go comment
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
-- in --
|
||||
// Go comment
|
||||
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
||||
-- out --
|
||||
// Go comment
|
||||
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
-- in --
|
||||
/********************
|
||||
* multiline message *
|
||||
********************/
|
||||
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
||||
-- out --
|
||||
/********************
|
||||
* multiline message *
|
||||
********************/
|
||||
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
-- in --
|
||||
// Go comment
|
||||
|
||||
/* Multiline comment on a single line */
|
||||
|
||||
/*
|
||||
|
||||
Multi-line comment on multiple lines
|
||||
|
||||
*/
|
||||
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
||||
-- out --
|
||||
// Go comment
|
||||
|
||||
/* Multiline comment on a single line */
|
||||
|
||||
/*
|
||||
|
||||
Multi-line comment on multiple lines
|
||||
|
||||
*/
|
||||
|
||||
package goof
|
||||
|
||||
templ Hello() {
|
||||
Hello
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
-- in --
|
||||
//go:build dev
|
||||
|
||||
package p
|
||||
|
||||
-- out --
|
||||
//go:build dev
|
||||
|
||||
package p
|
||||
|
@@ -0,0 +1,34 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(
|
||||
p.Test,
|
||||
"s",
|
||||
){
|
||||
@another.Component(
|
||||
p.Test,
|
||||
3,
|
||||
"s",
|
||||
){
|
||||
<p>hello</p>
|
||||
}
|
||||
}
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(
|
||||
p.Test,
|
||||
"s",
|
||||
) {
|
||||
@another.Component(
|
||||
p.Test,
|
||||
3,
|
||||
"s",
|
||||
) {
|
||||
<p>hello</p>
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(
|
||||
p.Test,
|
||||
"s",
|
||||
){
|
||||
<p>hello</p>
|
||||
}
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(
|
||||
p.Test,
|
||||
"s",
|
||||
) {
|
||||
<p>hello</p>
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
<div>
|
||||
@Other(
|
||||
p.Test,
|
||||
"s",
|
||||
)
|
||||
</div>
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
<div>
|
||||
@Other(
|
||||
p.Test,
|
||||
"s",
|
||||
)
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(p.Test,"s")
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(p.Test, "s")
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(p.Test, "s"){
|
||||
<p>hello</p>
|
||||
}
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(p.Test, "s") {
|
||||
<p>hello</p>
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
<div>
|
||||
@Other(p.Test, "s")
|
||||
</div>
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
<div>
|
||||
@Other(p.Test, "s")
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
-- in --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(p.Test)
|
||||
}
|
||||
-- out --
|
||||
package p
|
||||
|
||||
templ f() {
|
||||
@Other(p.Test)
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<area>
|
||||
<area></area>
|
||||
<base>
|
||||
<base></base>
|
||||
<br>
|
||||
<br></br>
|
||||
<col>
|
||||
<col></col>
|
||||
<command>
|
||||
<command></command>
|
||||
<embed>
|
||||
<embed></embed>
|
||||
<hr>
|
||||
<hr></hr>
|
||||
<img>
|
||||
<img></img>
|
||||
<input>
|
||||
<input></input>
|
||||
<input>Text
|
||||
<input>Text</input>
|
||||
<keygen>
|
||||
<keygen></keygen>
|
||||
<link>
|
||||
<link></link>
|
||||
<meta>
|
||||
<meta></meta>
|
||||
<param>
|
||||
<param></param>
|
||||
<source>
|
||||
<source></source>
|
||||
<track>
|
||||
<track></track>
|
||||
<wbr>
|
||||
<wbr></wbr>
|
||||
}
|
||||
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<area/>
|
||||
<area/>
|
||||
<base/>
|
||||
<base/>
|
||||
<br/>
|
||||
<br/>
|
||||
<col/>
|
||||
<col/>
|
||||
<command/>
|
||||
<command/>
|
||||
<embed/>
|
||||
<embed/>
|
||||
<hr/>
|
||||
<hr/>
|
||||
<img/>
|
||||
<img/>
|
||||
<input/>
|
||||
<input/>
|
||||
<input/>Text
|
||||
<input/>Text
|
||||
<keygen/>
|
||||
<keygen/>
|
||||
<link/>
|
||||
<link/>
|
||||
<meta/>
|
||||
<meta/>
|
||||
<param/>
|
||||
<param/>
|
||||
<source/>
|
||||
<source/>
|
||||
<track/>
|
||||
<track/>
|
||||
<wbr/>
|
||||
<wbr/>
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
-- in --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div>
|
||||
<div><b>Text</b></div></div>
|
||||
}
|
||||
-- out --
|
||||
package test
|
||||
|
||||
templ input(value, validation string) {
|
||||
<div>
|
||||
<div><b>Text</b></div>
|
||||
</div>
|
||||
}
|
Reference in New Issue
Block a user