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

(Scala) Strings in triple quotes are highlighted incorrectly. #2986

Closed
toshetah opened this issue Feb 4, 2021 · 1 comment · Fixed by #2987
Closed

(Scala) Strings in triple quotes are highlighted incorrectly. #2986

toshetah opened this issue Feb 4, 2021 · 1 comment · Fixed by #2987
Labels
bug help welcome Could use help from community language

Comments

@toshetah
Copy link

toshetah commented Feb 4, 2021

Describe the issue
For example, the code:

val s = """ this is a string "this is still a string" another quote: " after the quote """

create a String with the content:

 this is a string "this is still a string" another quote: " after the quote 

This code is highlighted incottectly. this is still a string, and after the quote is not formatted as a string, although they should be. The rule is that single quotes are just part of the string when they are surrounded by triple quotes.

For more context please see this Meta Stack Overflow question.

Which language seems to have the issue?
Scala

Are you using highlight or highlightAuto?

I am not sure. The one that Stack Overflow is using.

Sample Code to Reproduce

val s = """ this is a string "this is still a string" another quote: " after the quote """

Expected behavior
s to be string, and not to open code segments in the middle of the string.

Additional context
Nothing I can think of :)

@toshetah toshetah added bug help welcome Could use help from community language labels Feb 4, 2021
@joshgoebel
Copy link
Member

Can you review 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