Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix template string transpile bug. #361

Merged
merged 1 commit into from
Mar 16, 2021
Merged

Conversation

TwitchBronBron
Copy link
Member

Fixes a bug where transpiling a template string with two side-by-side inline expressions were missing a plus to separate them.
Fixes #355

@@ -1065,7 +1065,10 @@ export class TemplateStringExpression extends Expression {
...items
);
}
plus = items.length > 0 ? ' + ' : '';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@georgejecook this was the issue. The plus was being set back to an empty string for the next zero length item. And since the expressions were side-by-side, the next quasi was zero length.

@TwitchBronBron TwitchBronBron merged commit 08e016e into master Mar 16, 2021
@TwitchBronBron TwitchBronBron deleted the templatestring-fix branch March 16, 2021 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

template strings break when mulitple expressions are back to back
2 participants