-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
enh(scala) fix triple quoted string #2987
Conversation
{ | ||
begin: '"""', | ||
end: '"""', | ||
relevance: 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically the main change I see here is that you removed the relevance
, and that you changed the order. Can you please explain what do those changes do? Next time I might just contribute it myself :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well if "
matches first that breaks everything, so we have to match """
first... and the relevance is a much longer explication... find the thread on huge relevance and read it for a start for more thoughts... 10 is just too high for something that is shared by several languages now, so I removed the huge relevance bump.
The sequencing is what fixes the issue.
I'd add another test of multi line string:
should produce:
and:
should produce:
Code run at Scastie. |
If you wanted to contribute additional tests to the project (expanding on |
Of course our parsing engine doesn't care about the how the string is interpreted, we just highlight it. So your last two examples are irrelevant in our context - as far as I can tell. The highlighted is the same in both cases, regardless of what the end result it inside the runtime. |
* enh(scala) fix triple quoted string * add initial string tests
Resolves #2986
Checklist
CHANGES.md
AUTHORS.txt
, under Contributors