Page 1 of 1

Bug with nested SyntaxStart/SyntaxEnd

Posted: Fri Apr 16, 2010 6:25 pm
by FWishbringer
I'm working on an updated syntax definition for CSS, in which, nesting {}'s is legal, and used for 'classes' using the @keyword feature.

Now, the problem is, if SyntaxStart and SyntaxEnd are { and }, and you have a chunk of code such as:
@media all and (max-width: 200px) {
html {margin: 0;}
h1 {
margin: 0;
background-color: #FFFFFF;
}
h1::before, h1::after {display: none;}
}
It works like this...
@media all and (max-width: 200px) {
html {margin: 0;}

h1 {
margin: 0;
background-color: #FFFFFF;
}

h1::before, h1::after {display: none;}
}
If I add {} to valid parenthesis, it will highlight the dangling open or close only.

I believe what should occur is SyntaxStart and SyntaxEnd should follow the 'matching' rule, and use the outermost set, and ignore all occurrences between if the between occurrences are not listed as parenthesis, and then, treat the inner as parenthesis.