diff --git a/taglibs/core/TagHandlerNode.js b/taglibs/core/TagHandlerNode.js index 3d2fb9ce8..0ca55ffda 100644 --- a/taglibs/core/TagHandlerNode.js +++ b/taglibs/core/TagHandlerNode.js @@ -267,7 +267,10 @@ TagHandlerNode.prototype = { var hasOutParam = false; + var hasBodyFunc = false; + if (_this.hasChildren() && !tag.bodyFunction) { + hasBodyFunc = true; var bodyParams = []; @@ -296,6 +299,9 @@ TagHandlerNode.prototype = { } if (hasNestedTags || isNestedTag || hasOutParam) { + if (!hasBodyFunc) { + template.code(',null'); + } var options = []; if (hasNestedTags) { diff --git a/test/fixtures/templates/nested-tags-empty-body/expected.html b/test/fixtures/templates/nested-tags-empty-body/expected.html index bfff9f5dc..1d4d1d228 100644 --- a/test/fixtures/templates/nested-tags-empty-body/expected.html +++ b/test/fixtures/templates/nested-tags-empty-body/expected.html @@ -1 +1 @@ -
Tab 1 content
Tab 3 content
\ No newline at end of file +
Tab 1 content
Tab 3 content
\ No newline at end of file diff --git a/test/fixtures/templates/nested-tags-self-closing/expected.html b/test/fixtures/templates/nested-tags-self-closing/expected.html index bfff9f5dc..1d4d1d228 100644 --- a/test/fixtures/templates/nested-tags-self-closing/expected.html +++ b/test/fixtures/templates/nested-tags-self-closing/expected.html @@ -1 +1 @@ -
Tab 1 content
Tab 3 content
\ No newline at end of file +
Tab 1 content
Tab 3 content
\ No newline at end of file