graphql / graphql/graphiql

[vscode-graphql-syntax] Text on the same line after `#graphql` inside a Javascript string is not formatted as a comment

Open
#2,843 2 comments 1 reaction 0 assignees View on GitHub
bug grammar vscode-graphql-syntax
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

### Description:

Observe the following:

![image](https://user-images.githubusercontent.com/6047296/198238304-912f0860-1378-4d19-b029-a0d90e6d7785.png)

Text on the same line after the first `#graphql` keyword is not formatted as a comment. It can lead to confusion if the code is invalid, but appears valid like this:

![image](https://user-images.githubusercontent.com/6047296/198238641-2209667a-bce9-43ec-97d3-966a1a658a3a.png)

### Is there an existing issue for this?

- [X] I have searched the existing issues

**PS:** Please [fix `vscode-syntax-bug.yml`](https://github.com/graphql/graphiql/edit/main/.github/ISSUE_TEMPLATE/vscode-syntax-bug.yml) issue template. It has the above checkbox only. I had to edit the comment to add the description.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.