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

fixes template strings introducing errant plus when there are no items #327

Merged
merged 2 commits into from
Feb 20, 2021

Conversation

georgejecook
Copy link
Contributor

No description provided.

@@ -74,6 +74,13 @@ describe('TemplateStringExpression', () => {
program.dispose();
});

it('properly transpiles simple template string with no leading text', () => {
testTranspile(
`a = \`\${one},\${two}\``,
Copy link
Member

Choose a reason for hiding this comment

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

You can use single quotes for this string so that you don't need to escape the template string stuff.

'a = `${one},${two}`',

Copy link
Member

Choose a reason for hiding this comment

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

I fixed this.

Copy link
Member

@TwitchBronBron TwitchBronBron left a comment

Choose a reason for hiding this comment

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

Looks great! I tweaked the input test for your call to testTranspile so we didn't have to escape so many characters. Thanks for this!

@TwitchBronBron TwitchBronBron merged commit 345ee59 into master Feb 20, 2021
@TwitchBronBron TwitchBronBron deleted the fix-template-string-with-only-epxressions branch February 20, 2021 12:08
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.

2 participants