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

Broken string interpolation #5

Closed
1v4nx opened this issue Nov 10, 2020 · 2 comments
Closed

Broken string interpolation #5

1v4nx opened this issue Nov 10, 2020 · 2 comments
Assignees

Comments

@1v4nx
Copy link

1v4nx commented Nov 10, 2020

When interpolating with alpha characters in between (e.g, fragments), we end up with the same issue as in #4.

Input

const fragName = 'name';
const fragType = 'type';

gql`
fragment ${fragName} on ${fragType} {
  id
  name
}
`

Output
`fragment${fragName} on${fragType}{id name}`;

Expected output
`fragment ${fragName} on ${fragType}{id name}`;

Versions:

  • Plugin version: v1.3.2
@1v4nx
Copy link
Author

1v4nx commented Nov 17, 2020

@frontendr Any updates on this??

frontendr added a commit that referenced this issue Nov 18, 2020
Release 1.3.3

- #5 - Fixed an issue where there was not enough white space between parts and variables in template literals in certain cases.
@frontendr
Copy link
Owner

@1v4nx Thanks for your PR! I've created release 1.3.3 which includes a fix for this using most of the same logic.

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 a pull request may close this issue.

2 participants