Skip to content

Commit

Permalink
Delete dynamic_no_whitespace
Browse files Browse the repository at this point in the history
My PR to Blaze was accepted, so this is now the default behavior for `Template.dynamic`.
  • Loading branch information
Torgen committed Oct 1, 2024
1 parent 5b5143a commit 76685d2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion client/chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h6>in reply to @<a href="https://twitter.com/{{message.tweet.quote_nick}}" targ
</template>

<template name="chat_format_body">
{{#each chunk in chunks}}{{>dynamic_no_whitespace template=(chunk_template chunk.type) data=chunk.content}}{{/each}}
{{#each chunk in chunks}}{{>Template.dynamic template=(chunk_template chunk.type) data=chunk.content}}{{/each}}
</template>

<template name="poll">
Expand Down
9 changes: 1 addition & 8 deletions client/text_chunk.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@

<template name="dynamic_no_whitespace">{{
#with chooseTemplate template}}{{
# .. ../data}}{{
> Template.contentBlock}}{{
/ ..}}{{
/with}}</template>

<template name="text_chunks">{{#each chunk in chunks}}{{>dynamic_no_whitespace template=(concat "text_chunk_" chunk.type) data=chunk.content}}{{/each}}</template>
<template name="text_chunks">{{#each chunk in chunks}}{{>Template.dynamic template=(concat "text_chunk_" chunk.type) data=chunk.content}}{{/each}}</template>

<template name="text_chunk_break"><br></template>

Expand Down
6 changes: 0 additions & 6 deletions client/text_chunk.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,3 @@ Template.text_chunk_url_image.helpers({
return url.match(/(\.|format=)(png|jpg|jpeg|gif)$/i);
},
});

Template.dynamic_no_whitespace.helpers({
chooseTemplate(name) {
return Blaze._getTemplate(name, () => Template.instance());
},
});

0 comments on commit 76685d2

Please sign in to comment.