Skip to content

Commit

Permalink
Merge pull request #351 from Torgen/dynamic-no-whitespace
Browse files Browse the repository at this point in the history
Eliminate whitespace in Template.dynamic
  • Loading branch information
StorytellerCZ authored Jul 28, 2022
2 parents 871501c + 5d68d54 commit 41d3611
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions packages/templating-runtime/dynamic.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
property is not specified, then the parent data context will be used
instead. Uses the __dynamicWithDataContext template below to actually
render the template. -->
<template name="__dynamic">
{{checkContext}}
{{#if dataContextPresent}}
{{# __dynamicWithDataContext}}{{> Template.contentBlock}}{{/__dynamicWithDataContext}}
{{else}}
{{! if there was no explicit 'data' argument, use the parent context}}
{{# __dynamicWithDataContext template=template data=..}}{{> Template.contentBlock}}{{/__dynamicWithDataContext}}
{{/if}}
</template>
<template name="__dynamic">{{
checkContext}}{{
#if dataContextPresent}}{{
# __dynamicWithDataContext}}{{> Template.contentBlock}}{{/__dynamicWithDataContext}}{{
else
}}{{! if there was no explicit 'data' argument, use the parent context}}{{
# __dynamicWithDataContext template=template data=..}}{{> Template.contentBlock}}{{/__dynamicWithDataContext}}{{
/if
}}</template>

<!-- Expects the data context to have a `template` property (the name of
the template to render) and a `data` property, which can be falsey. -->
<template name="__dynamicWithDataContext">
{{#with chooseTemplate template}}
{{!-- The .. is evaluated inside {{#with ../data}} --}}
{{# .. ../data}}{{> Template.contentBlock}}{{/ ..}}
{{/with}}
</template>
<template name="__dynamicWithDataContext">{{
#with chooseTemplate template
}}{{!-- The .. is evaluated inside {{#with ../data}} --}}{{
# .. ../data}}{{> Template.contentBlock}}{{/ ..}}{{
/with
}}</template>

0 comments on commit 41d3611

Please sign in to comment.