vscodenpa / testissues

Clone of the vscode issue stream.
43 stars 23 forks source link

GraphQL Heredoc highlighting is wrong #623

Open vscodenpa opened 2 years ago

vscodenpa commented 2 years ago

Issue Type: Bug

Hello,

While working on Ruby on Rails project, I noticed that the highlighting in the spec files is somehow wrong when using heredocs for GraphQL. It seems that after the first GraphQL heredoc, everything goes in yellow. I will upload a screenshot.

Example:

- foo_spec.rb

require 'rails_helper'

module Graph
  module Mutations
    describe FooMutation do
      it 'flags foo' do
        foo = create :foo

        resolve <<~GRAPHQL, id: foo.id, flag: true
          mutation($id: ID!) {
            flagFoo(input: {id: $id}) {
              foo {
                flagged
              }
            }
          }
        GRAPHQL

        response_data.should eq 'flagFoo' => {'foo' => {'flagged' => true}]}
      end

      it 'unflags foo' do
        foo = create :foo

        resolve <<~GRAPHQL, receiptIds: [receipt.graphql_id], flag: false
          mutation($receiptIds: [ID!]!, $flag: Boolean!) {
            flagFoo(input: {id: $id}) {
              foo {
                flagged
              }
            }
          }
        GRAPHQL

        response_data.should eq 'flagFoo' => {'foo' => {'flagged' => false}}
      end
    end
  end
end

VS Code version: Code 1.67.2 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5, 2022-05-17T18:20:57.384Z) OS version: Darwin x64 20.6.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9880H CPU - 2.30GHz (16 x 2300)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|3, 4, 3| |Memory (System)|16.00GB (0.36GB free)| |Process Argv|--crash-reporter-id ddf221d7-6a43-437e-a4da-c09b4559cc3e| |Screen Reader|no| |VM|0%|
Extensions (13) Extension|Author (truncated)|Version ---|---|--- vscode-apollo|apo|1.19.11 vscode-eslint|dba|2.2.2 gitlens|eam|12.0.6 prettier-vscode|esb|9.5.0 go-to-spec|Lou|0.1.3 ruby-rubocop|mis|0.8.6 prettify-json|moh|0.0.3 rails-run-spec-vscode|nok|0.1.4 ruby|reb|0.28.1 slim|sia|0.1.2 code-spell-checker|str|2.2.0 vscode-stylelint|sty|1.2.2 vscode-ruby|win|0.28.0
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyl392:30443607 pythontb:30283811 pythonvspyt551:30345470 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805cf:30301675 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 pythonvsnew555:30457759 vscscmwlcmt:30465135 cppdebug:30492333 vsclangdf:30486550 ```
vscodenpa commented 2 years ago

confidence for label grammar: 0.55. does not meet threshold

vscodenpa commented 2 years ago

confidence for assignee alexr00: 0.6. does not meet threshold

vscodenpa commented 2 years ago

confidence for label grammar: 0.55. does not meet threshold

vscodenpa commented 2 years ago

confidence for assignee alexr00: 0.6. does not meet threshold

vscodenpa commented 2 years ago

confidence for label grammar: 0.55. does not meet threshold

vscodenpa commented 2 years ago

confidence for assignee alexr00: 0.6. does not meet threshold