Giter Site home page Giter Site logo

Comments (9)

ottob avatar ottob commented on May 19, 2024

Yes, something is fishy with the var keyword. I have this:

v := "var f"
fmt.Println(v)

resulting in:
screen shot 2016-01-29 at 08 35 14

Notice that fmt.Println(v) is highlighted as a comment, as is the rest of the file after the var keyword. If I edit the string to be just "var" or "varf" the highlighting doesn't break.

from packages.

ottob avatar ottob commented on May 19, 2024

Adding a string with comment slashes seem to reset the highlighting:
works
If I remove the slashes, the comment highlighting continues:
nope

from packages.

wbond avatar wbond commented on May 19, 2024

There is a bug in Sublime Text's sregex engine that is treating the [[:blank:]] posix range as all of ascii. Should be fixed in the next dev build.

from packages.

FichteFoll avatar FichteFoll commented on May 19, 2024

I see that the Go syntax definition uses [[:blank:]] twice and \s everywhere else. Any particular reason?

From what I can tell, they differ in that \s also matches 000A, 000B, 000C, 000D, 0085(NEL), 2028 and 2029 characters, so mostly characters separating lines. Regular expressions are never applied on "multiple lines" though, except for when ST does not implement a unicode line separator character as an actual line separator (which is anything but 000A and 000D; see sublimehq/sublime_text#548).

from packages.

wbond avatar wbond commented on May 19, 2024

@FichteFoll I believe the reason, in this case, is that someone wrote the .tmLanguage version and it was converted to .sublime-syntax. I have noticed that in general the syntax tends to handle unicode better than many, such as by using [[:alpha:]] and [[:alnum:]] instead of just [a-zA-Z] and [a-zA-Z0-9]. My guess is that they used [[:blank:]] for such a reason.

from packages.

wbond avatar wbond commented on May 19, 2024

In the process of testing the fixes in ST for ``[[:blank:]]` I fixed a few small issues with the syntax in 380a68e.

from packages.

stevekuznetsov avatar stevekuznetsov commented on May 19, 2024

@wbond thanks so much for doing this work. If I'm trying to pick up your changes, is there a faster way than waiting for a new beta build?

from packages.

FichteFoll avatar FichteFoll commented on May 19, 2024

@stevekuznetsov follow the 'Installation' guide in the readme.

from packages.

ottob avatar ottob commented on May 19, 2024

My issues are fixed now. Thanks @wbond!

from packages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.