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":
<begin>/</begin>
<end>/</end>
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