mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Fixes #219 - Marko v3: Use ":" instead of "." for nested tags
This commit is contained in:
parent
8f9d1094af
commit
67c431019d
@ -102,7 +102,7 @@ class TaglibLookup {
|
||||
|
||||
function handleNestedTags(tag, parentTagName) {
|
||||
tag.forEachNestedTag(function(nestedTag) {
|
||||
var fullyQualifiedName = parentTagName + '.' + nestedTag.name;
|
||||
var fullyQualifiedName = parentTagName + ':' + nestedTag.name;
|
||||
// Create a clone of the nested tag since we need to add some new
|
||||
// properties
|
||||
var clonedNestedTag = new Tag();
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
<div>
|
||||
|
||||
<test-nested-tags-overlay.header class="my-header">
|
||||
<test-nested-tags-overlay:header class="my-header">
|
||||
Header content
|
||||
</test-nested-tags-overlay.header>
|
||||
</test-nested-tags-overlay:header>
|
||||
|
||||
Body content
|
||||
|
||||
<test-nested-tags-overlay.footer class="my-footer">
|
||||
<test-nested-tags-overlay:footer class="my-footer">
|
||||
Footer content
|
||||
</test-nested-tags-overlay.footer>
|
||||
</test-nested-tags-overlay:footer>
|
||||
</div>
|
||||
@ -3,6 +3,6 @@ var expect = require('chai').expect;
|
||||
exports.checkError = function(e) {
|
||||
expect(e.toString()).to.contain('Tag not nested within a');
|
||||
expect(e.toString()).to.contain('<test-nested-tags-overlay>');
|
||||
expect(e.toString()).to.contain('<test-nested-tags-overlay.header>');
|
||||
expect(e.toString()).to.contain('<test-nested-tags-overlay.footer>');
|
||||
expect(e.toString()).to.contain('<test-nested-tags-overlay:header>');
|
||||
expect(e.toString()).to.contain('<test-nested-tags-overlay:footer>');
|
||||
};
|
||||
@ -1,11 +1,11 @@
|
||||
<test-nested-tags-overlay header="data.header">
|
||||
|
||||
<test-nested-tags-overlay.body class="my-body">
|
||||
<test-nested-tags-overlay:body class="my-body">
|
||||
Body content
|
||||
</test-nested-tags-overlay.body>
|
||||
</test-nested-tags-overlay:body>
|
||||
|
||||
<test-nested-tags-overlay.footer class="my-footer">
|
||||
<test-nested-tags-overlay:footer class="my-footer">
|
||||
Footer content
|
||||
</test-nested-tags-overlay.footer>
|
||||
</test-nested-tags-overlay:footer>
|
||||
|
||||
</test-nested-tags-overlay>
|
||||
1
test/fixtures/render/autotest/nested-tags-concise/expected.html
vendored
Normal file
1
test/fixtures/render/autotest/nested-tags-concise/expected.html
vendored
Normal file
@ -0,0 +1 @@
|
||||
<div class="tabs"><ul><li>Tab 1</li><li>Tab 2</li><li>Tab 3</li></ul><div class="tab-content"><div class="tab">Tab 1 content</div><div class="tab"></div><div class="tab">Tab 3 content</div></div></div>
|
||||
5
test/fixtures/render/autotest/nested-tags-concise/template.marko
vendored
Normal file
5
test/fixtures/render/autotest/nested-tags-concise/template.marko
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
test-nested-tags-tabs
|
||||
test-nested-tags-tabs:tab title="Tab 1"
|
||||
- Tab 1 content
|
||||
test-nested-tags-tabs:tab title="Tab 2"
|
||||
test-nested-tags-tabs:tab title="Tab 3" - Tab 3 content
|
||||
1
test/fixtures/render/autotest/nested-tags-concise/test.js
vendored
Normal file
1
test/fixtures/render/autotest/nested-tags-concise/test.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
exports.templateData = {};
|
||||
@ -1,12 +1,12 @@
|
||||
<test-nested-tags-deep class="nested-tags-deep">
|
||||
<test-nested-tags-deep.item foo="bar">
|
||||
<test-nested-tags-deep.item.body>
|
||||
<test-nested-tags-deep:item foo="bar">
|
||||
<test-nested-tags-deep:item:body>
|
||||
<b>Deeply nested!</b>
|
||||
</test-nested-tags-deep.item.body>
|
||||
</test-nested-tags-deep.item>
|
||||
<test-nested-tags-deep.item foo="baz">
|
||||
<test-nested-tags-deep.item.body>
|
||||
</test-nested-tags-deep:item:body>
|
||||
</test-nested-tags-deep:item>
|
||||
<test-nested-tags-deep:item foo="baz">
|
||||
<test-nested-tags-deep:item:body>
|
||||
<b>Another deeply nested!</b>
|
||||
</test-nested-tags-deep.item.body>
|
||||
</test-nested-tags-deep.item>
|
||||
</test-nested-tags-deep:item:body>
|
||||
</test-nested-tags-deep:item>
|
||||
</test-nested-tags-deep>
|
||||
@ -1,12 +1,12 @@
|
||||
<test-nested-tags-tabs>
|
||||
<test-nested-tags-tabs.tab title="Tab 1">
|
||||
<test-nested-tags-tabs:tab title="Tab 1">
|
||||
|
||||
Tab 1 content
|
||||
</test-nested-tags-tabs.tab>
|
||||
</test-nested-tags-tabs:tab>
|
||||
|
||||
<test-nested-tags-tabs.tab title="Tab 2"></test-nested-tags-tabs.tab>
|
||||
<test-nested-tags-tabs:tab title="Tab 2"></test-nested-tags-tabs:tab>
|
||||
|
||||
<test-nested-tags-tabs.tab title="Tab 3">
|
||||
<test-nested-tags-tabs:tab title="Tab 3">
|
||||
Tab 3 content
|
||||
</test-nested-tags-tabs.tab>
|
||||
</test-nested-tags-tabs:tab>
|
||||
</test-nested-tags-tabs>
|
||||
@ -1,21 +1,21 @@
|
||||
<test-nested-tags-overlay header=data.header>
|
||||
|
||||
<test-nested-tags-overlay.body class="my-body">
|
||||
<test-nested-tags-overlay:body class="my-body">
|
||||
Body content
|
||||
</test-nested-tags-overlay.body>
|
||||
</test-nested-tags-overlay:body>
|
||||
|
||||
<test-nested-tags-overlay.footer class="my-footer">
|
||||
<test-nested-tags-overlay:footer class="my-footer">
|
||||
Footer content
|
||||
</test-nested-tags-overlay.footer>
|
||||
</test-nested-tags-overlay:footer>
|
||||
</test-nested-tags-overlay>
|
||||
|
||||
<test-nested-tags-overlay>
|
||||
|
||||
<test-nested-tags-overlay.body class="my-body">
|
||||
<test-nested-tags-overlay:body class="my-body">
|
||||
Body content 2
|
||||
</test-nested-tags-overlay.body>
|
||||
</test-nested-tags-overlay:body>
|
||||
|
||||
<test-nested-tags-overlay.footer class="my-footer">
|
||||
<test-nested-tags-overlay:footer class="my-footer">
|
||||
Footer content 2
|
||||
</test-nested-tags-overlay.footer>
|
||||
</test-nested-tags-overlay:footer>
|
||||
</test-nested-tags-overlay>
|
||||
@ -1,14 +1,14 @@
|
||||
<test-nested-tags-tabs>
|
||||
<test-nested-tags-tabs.tab title="Tab 1">
|
||||
<test-nested-tags-tabs:tab title="Tab 1">
|
||||
|
||||
Tab 1 content
|
||||
</test-nested-tags-tabs.tab>
|
||||
</test-nested-tags-tabs:tab>
|
||||
|
||||
<test-nested-tags-tabs.tab title="Tab 2" if(false)>
|
||||
<test-nested-tags-tabs:tab title="Tab 2" if(false)>
|
||||
Tab 2 content
|
||||
</test-nested-tags-tabs.tab>
|
||||
</test-nested-tags-tabs:tab>
|
||||
|
||||
<test-nested-tags-tabs.tab title="Tab 3">
|
||||
<test-nested-tags-tabs:tab title="Tab 3">
|
||||
Tab 3 content
|
||||
</test-nested-tags-tabs.tab>
|
||||
</test-nested-tags-tabs:tab>
|
||||
</test-nested-tags-tabs>
|
||||
@ -1,12 +1,12 @@
|
||||
<test-nested-tags-tabs>
|
||||
<test-nested-tags-tabs.tab title="Tab 1">
|
||||
<test-nested-tags-tabs:tab title="Tab 1">
|
||||
|
||||
Tab 1 content
|
||||
</test-nested-tags-tabs.tab>
|
||||
</test-nested-tags-tabs:tab>
|
||||
|
||||
<test-nested-tags-tabs.tab title="Tab 2"/>
|
||||
<test-nested-tags-tabs:tab title="Tab 2"/>
|
||||
|
||||
<test-nested-tags-tabs.tab title="Tab 3">
|
||||
<test-nested-tags-tabs:tab title="Tab 3">
|
||||
Tab 3 content
|
||||
</test-nested-tags-tabs.tab>
|
||||
</test-nested-tags-tabs:tab>
|
||||
</test-nested-tags-tabs>
|
||||
@ -1,10 +1,10 @@
|
||||
<test-nested-tags-overlay header=data.header>
|
||||
|
||||
<test-nested-tags-overlay.body class="my-body">
|
||||
<test-nested-tags-overlay:body class="my-body">
|
||||
Body content
|
||||
</test-nested-tags-overlay.body>
|
||||
</test-nested-tags-overlay:body>
|
||||
|
||||
<test-nested-tags-overlay.footer class="my-footer">
|
||||
<test-nested-tags-overlay:footer class="my-footer">
|
||||
Footer content
|
||||
</test-nested-tags-overlay.footer>
|
||||
</test-nested-tags-overlay:footer>
|
||||
</test-nested-tags-overlay>
|
||||
Loading…
x
Reference in New Issue
Block a user