Problem:
Regular expressions in Groovy break highlighting.
For example, see the following code that would be highlighted incorrectly:
def matcher = s =~ /\'([a-zA-Z_]+)\'/
if (matcher.size()==0) {
println "Skipping line $lno: $t"
} else {
result.add(matcher[0][1]);
}
Fix:
Regexp delimiters should be added to "groovy.xml":
<SPAN TYPE="LITERAL1" ESCAPE="\\">
<BEGIN>/</BEGIN>
<END>/</END>
</SPAN>
Just noticed that the patch above breaks one-line comments. This should be handled the same way as in JavaScript. Patch should be
<EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
<SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="/" AT_WORD_START="TRUE">/[^\p{Blank}]*?/</SEQ_REGEXP>
Committed 24658