Home Download Buy Blog Forum Support

Scala syntax: small bug regarding triple-quotes

Scala syntax: small bug regarding triple-quotes

Postby murr4y on Wed Aug 10, 2011 10:26 am

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.

Image

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

Code: Select all
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?
murr4y
 
Posts: 2
Joined: Fri Jul 29, 2011 10:56 am

Re: Scala syntax: small bug regarding triple-quotes

Postby adzenith on Wed Aug 10, 2011 2:17 pm

This should fix it:
Code: Select all
--- Scala.tmLanguage   2011-08-10 22:12:11.000000000 +0800
+++ Scala.tmLanguage   2011-08-10 22:11:50.000000000 +0800
@@ -558,7 +558,7 @@
               <key>begin</key>
               <string>"""</string>
               <key>end</key>
-               <string>"""</string>
+               <string>"""(?!")</string>
               <key>name</key>
               <string>string.quoted.triple.scala</string>
            </dict>

It looks to be broken in TextMate, too. I'd report the issue here: https://github.com/mads379/scala.tmbundle/issues
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Re: Scala syntax: small bug regarding triple-quotes

Postby murr4y on Mon Aug 22, 2011 5:17 pm

Thanks! I've created a pull request on github with your suggested fix.
murr4y
 
Posts: 2
Joined: Fri Jul 29, 2011 10:56 am

Re: Scala syntax: small bug regarding triple-quotes

Postby adzenith on Mon Aug 22, 2011 5:30 pm

Excellent. Glad I could help!
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Re: Scala syntax: small bug regarding triple-quotes

Postby kovitta90 on Mon Feb 20, 2012 5:41 pm

hello,
hmm well thanks that's amazing work short friendship quotes well keep it up
kovitta90
 
Posts: 1
Joined: Mon Feb 20, 2012 5:39 pm


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests