I'm making a custom rule for programming language Lint to :
- match 1 or more empty lines after
{, and - another rule to match empty line before
}.
As an example in this code, I want these rules to match line 2 and line 5 :
class Test { /* Line 1 */
/* Line 2 */
func example() { /* Line 3 */
} /* Line 4 */
/* Line 5 */
}
I had tried to do it with positive lookahead/lookbehind but with no luck (?<=\{)\n.
Could anyone help with it ?
Update:
Added whitespeace to the example.
class Test {
func example() {
}
}