Comments (9)
Yes, something is fishy with the var keyword. I have this:
v := "var f"
fmt.Println(v)
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.
Adding a string with comment slashes seem to reset the highlighting:
If I remove the slashes, the comment highlighting continues:
from packages.
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.
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.
@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.
In the process of testing the fixes in ST for ``[[:blank:]]` I fixed a few small issues with the syntax in 380a68e.
from packages.
@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.
@stevekuznetsov follow the 'Installation' guide in the readme.
from packages.
My issues are fixed now. Thanks @wbond!
from packages.
Related Issues (20)
- [Rust] Function call with with turbofish annotation missing scope
- [Markdown] LaTeX code block not highlighted HOT 8
- [Swift] Initial support HOT 6
- [C] Add more scopes for variable assignment HOT 1
- [Ruby] def end syntax pairing highlight gets confused by =begin =end comment pairs HOT 1
- [C#] Primary constructor
- [C#] required field
- [CSS] Different color for inheritable properties HOT 6
- [PHP] Named parameters affecting calls to closures in arrays
- [C++] Go to function append the return type of the function to the function name if separated on a different line if the return type is a custom type HOT 4
- [Python] Wrong highlighting of assignment after line continuation with string
- [CSS] Nesting at-rules (eg. `@media`) breaks syntax highlighting HOT 2
- [Batch] `> ...` is valid with `pause`
- [Python] Class name highlight HOT 1
- [BibTeX] Expand Selection does not work properly HOT 1
- [Python] Trailing `\\"` in `R"...\\"` should not be char escape
- [C] New C23 keywords
- view.replace not working
- [OCaml] "Quoted string" literals are not recognized HOT 2
- [C/C++] remove switch case auto unindent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packages.