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

(Ruby) Heredoc without interpolation ending isn't highlighted correctly #3153

Closed
JamesPaden opened this issue Apr 20, 2021 · 2 comments · Fixed by #3154
Closed

(Ruby) Heredoc without interpolation ending isn't highlighted correctly #3153

JamesPaden opened this issue Apr 20, 2021 · 2 comments · Fixed by #3154
Labels
bug help welcome Could use help from community language

Comments

@JamesPaden
Copy link

Describe the issue
Ruby heredocs without interpolation have slightly different openings and closings and are not being highlighted correctly.

Which language seems to have the issue?
Ruby

Are you using highlight or highlightAuto?
highlight

Sample Code to Reproduce

# standard heredoc
message = <<-MESSAGE
  This looks good
MESSAGE

# heredoc without interpolation
message = <<-'MESSAGE'
  This isn't highlighted correctly
MESSAGE

def not_a_string_anymore()
end

Screenshot
Screen Shot 2021-04-19 at 10 22 08 PM

Expected behavior
The entire heredoc should be highlighted as a string, with the ending detected.

Additional context
Ruby documentation:
https://ruby-doc.org/core-2.5.0/doc/syntax/literals_rdoc.html#label-Here+Documents

@joshgoebel
Copy link
Member

@JamesPaden Does that look about right?

@JamesPaden
Copy link
Author

@joshgoebel Looks great. Thanks for the quick fix!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants