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

string to template literal conversion doesn't handle this case correctly #1

Closed
capaj opened this issue Mar 19, 2018 · 1 comment
Closed
Assignees

Comments

@capaj
Copy link

capaj commented Mar 19, 2018

// from
'UPDATE payment_subscriptions ps SET subscription_start = NOW(), ' +
            "bt_subscription_id = '" +
            btSubscriptionId +
            "', " +
            "bt_customer_id = '" +
            btCustomerId +
            "' " +
            'WHERE id = ' +
            id

// get's converted into
`UPDATE payment_subscriptions ps SET subscription_start = NOW(), ${btSubscriptionId}bt_subscription_id = '${btCustomerId}', ${id}bt_customer_id = '' WHERE id = `

when the output should be:

`UPDATE payment_subscriptions ps SET subscription_start = NOW(), bt_subscription_id = '${btSubscriptionId}', bt_customer_id = '${btCustomerId}' WHERE id = '${id}`
@xsburg xsburg closed this as completed in e616414 Mar 19, 2018
@xsburg xsburg self-assigned this Mar 19, 2018
@xsburg
Copy link
Owner

xsburg commented Mar 19, 2018

Hi @capaj,
First of all, thanks for reporting the bug!
It seems that the problem is related to a sequence of two string literals sitting next to each other. The case wasn't handled properly.
The problem is fixed now, I will play with the new version locally for a day and then publish an update.
Cheers! 🎉

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

No branches or pull requests

2 participants