Skip to content

language server: allow template literal placeholders that span multiple rows.#1299

Merged
trevor-scheer merged 2 commits intoapollographql:masterfrom
henryqdineen:multiline-placeholder
May 30, 2019
Merged

language server: allow template literal placeholders that span multiple rows.#1299
trevor-scheer merged 2 commits intoapollographql:masterfrom
henryqdineen:multiline-placeholder

Conversation

@henryqdineen
Copy link
Copy Markdown
Contributor

Fixes: #1298

The fix is just to update the regex to handle newlines in a template literal placeholder. I think this code would be more robust if it used ASTs to extract the graphql documents but I'm assuming there was a reason to use regexes instead.

TODO:

  • Update CHANGELOG.md* with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.

henryqdineen and others added 2 commits May 30, 2019 09:51
* typo
* implicit any
* unused imports
* file name (+ 1 unrelated, but adjacent)
* changelog
@trevor-scheer trevor-scheer force-pushed the multiline-placeholder branch from 62a3910 to 96955ff Compare May 30, 2019 16:56
@trevor-scheer
Copy link
Copy Markdown
Contributor

@henryqdineen, very much appreciated - and thanks for the tests! I pushed a little cleanup to the branch to save you some minor nits. Going to merge as soon as the tests pass 😄

@trevor-scheer trevor-scheer merged commit 910e4f7 into apollographql:master May 30, 2019
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.

VS Code extension - Syntax Error with multi-line placeholders in gql

2 participants