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

Support parens #99

Merged
merged 5 commits into from
Oct 16, 2023
Merged

Support parens #99

merged 5 commits into from
Oct 16, 2023

Conversation

pvinis
Copy link
Contributor

@pvinis pvinis commented May 17, 2023

Turns out not too hard to fix. i added the parens in the regex.

Fixes #98.

@apollo-cla
Copy link

@pvinis: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/


it("works with parens", () => {
const textDocument = mockTextDocument(`
gql(\`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

heres the main diff

}

\${ReviewList.fragments.reviews}
\`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

and here

@pvinis
Copy link
Contributor Author

pvinis commented May 17, 2023

gh doesnt allow me to add you as a reviewer, so ill just tag here. @jgzuke

@pvinis
Copy link
Contributor Author

pvinis commented May 17, 2023

tested locally with npm run package-extension and it works great.

@pvinis
Copy link
Contributor Author

pvinis commented May 17, 2023

bundled up here. if you wanna use this PR's version of the extension:

  • download the zip
  • unzip to get a .vsix
  • import to vscode using the command palette (cmd+shift+P) and the Extensions: Install from VSIX command.

vscode-apollo-1.20.0.vsix.zip

@DonnyVerduijn
Copy link

LGTM

@@ -14,7 +14,7 @@
"name": "punctuation.definition.string.template.begin.js"
}
},
"end": "`",
"end": "`\\(?",
Copy link
Contributor

@alessbell alessbell Oct 16, 2023

Choose a reason for hiding this comment

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

Did you mean a closing parenthesis here?

Edit: pushed up this change.

Suggested change
"end": "`\\(?",
"end": "`\\)?",

Copy link
Contributor

@alessbell alessbell left a comment

Choose a reason for hiding this comment

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

Thanks @pvinis!

@alessbell alessbell merged commit 2a3fc1b into apollographql:main Oct 16, 2023
@github-actions github-actions bot mentioned this pull request Oct 16, 2023
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.

tag with parens doesnt work
4 participants