mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Added tests for using hyphens with @ tags
This commit is contained in:
parent
57a94d6de0
commit
e03362d942
@ -0,0 +1,5 @@
|
||||
{
|
||||
"@test-items <test-item>[]": {
|
||||
"@title": "string"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
<ul>
|
||||
<li for(item in input.testItems)>
|
||||
<h1>${item.title}</h1>
|
||||
<include(item.renderBody)/>
|
||||
</li>
|
||||
</ul>
|
||||
@ -0,0 +1 @@
|
||||
<ul><li><h1>Item 1 title</h1>Item 1 body</li><li><h1>Item 2 title</h1>Item 2 body</li></ul>
|
||||
@ -0,0 +1,4 @@
|
||||
<test-message>
|
||||
<@test-item title="Item 1 title">Item 1 body</@test-item>
|
||||
<@test-item title="Item 2 title">Item 2 body</@test-item>
|
||||
</test-message>
|
||||
@ -0,0 +1,7 @@
|
||||
exports.templateData = {
|
||||
header: {
|
||||
renderBody: function(out) {
|
||||
out.write('Header content!');
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -0,0 +1,5 @@
|
||||
<div class="message">
|
||||
<h1>
|
||||
<include(input.myTitle)/>
|
||||
</h1>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<div class="message"><h1>My title</h1></div>
|
||||
@ -0,0 +1,3 @@
|
||||
<test-message>
|
||||
<@my-title>My title</@my-title>
|
||||
</test-message>
|
||||
@ -0,0 +1,7 @@
|
||||
exports.templateData = {
|
||||
header: {
|
||||
renderBody: function(out) {
|
||||
out.write('Header content!');
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user