Closed marcelhollerbach closed 9 years ago
I don't quite understand what you need. What do you want to do and what is the problem?
There can be syntax like :
class Foo(Bar) {
...
}
but it can also be
class Foo(Bar)
{
...
}
With the given rule above, only the first example gets corretly highlighted, the second is not. So I guess the \n in the begin regex is not understood correctly. Am I doing something wrong here ? Or what is the way to get this working ?
Sublime Text only applies regular expressions on a single line due to performance optimizations. It is not possible to match the opening brace on the second line in a single pattern.
The only way to properly match this would be to use a begin-end match and then some special "inline" patterns, or to use the new and more powerful .sublime-syntax
format, which follows a concept of a "stack of contexts". You can read more about it here: http://www.sublimetext.com/docs/3/syntax.html. (Note: you need to use the dev channel for this)
I have the following code:
I can enter as many " " as I want, but no newline between class(..) and { Is the rule wrong here ? or is this a bug?