Repository navigation
fix(vscode-graphql-syntax): highlight the opening quote of descriptions - #4669
Open
shubhamrai9122-creator wants to merge 1 commit into
Open
shubhamrai9122-creator wants to merge 1 commit into
shubhamrai9122-creator wants to merge 1 commit into
Conversation
The single-line description rule gave its opening quote the punctuation.whitespace.comment.leading scope, copied from the hash comment rule where it marks leading whitespace. Themes that colour punctuation drew the opening quote differently from the rest of the description. Both quotes now get only the description's scope, as the quotes of block descriptions do. Signed-off-by: shubhamrai9122-creator <shubhamrai9122@gmail.com>
🦋 Changeset detectedLatest commit: e4f4dd8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4235
The single-line description rule (
graphql-description-string) gave its opening"an extrapunctuation.whitespace.comment.leading.graphqlscope. That scope comes from the#comment rule, where it marks the whitespace before#(for Atom's reflow command). Here it landed on the quote itself, so themes that stylepunctuationcoloured the opening quote differently from the rest of the description, while the closing quote looked right.The rule now has no
beginCaptures, so both quotes get onlycomment.line.documentation.graphql, matching block descriptions, whose"""already have justcomment.block.documentation.graphql.descriptions-and-values.graphqltest now checks that every quote of a single-line description ends in the description scope. It fails without the grammar change.punctuation.whitespace.comment.leading.graphql, and nothing else changes.vitest runinvscode-graphql-syntax(18 passing), plus oxfmt, oxlint and cspell on the changed files. Added a patch changeset.