Sublime Forum

Scala syntax: small bug regarding triple-quotes

#1

Hi!

In the following example, I’m creating a String using triple-quotes.
The thing is that the last character in the String is a quote-sign, requiring four quote signs in a row. This confuses the syntax script.

This is valid Scala code, as running the example will output:

foo"

But as you can see, the syntax highlighter doesn’t recognize that the triple-quote has ended.

Is this the right place to report this bug?

0 Likes

#2

This should fix it:

[code]— Scala.tmLanguage 2011-08-10 22:12:11.000000000 +0800
+++ Scala.tmLanguage 2011-08-10 22:11:50.000000000 +0800
@@ -558,7 +558,7 @@
begin
“”"
end

  •   			<string>"""</string>
    
  •   			<string>"""(?!")</string>
      			<key>name</key>
      			<string>string.quoted.triple.scala</string>
      		</dict>
    

[/code]
It looks to be broken in TextMate, too. I’d report the issue here: github.com/mads379/scala.tmbundle/issues

0 Likes

#3

Thanks! I’ve created a pull request on github with your suggested fix.

0 Likes

#4

Excellent. Glad I could help!

0 Likes

#5

hello,
hmm well thanks that’s amazing work short friendship quotes well keep it up

0 Likes