[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16915: 24.3.50; [ruby-mode] Comments in regexps using the extended s
bug#16915: 24.3.50; [ruby-mode] Comments in regexps using the extended syntax are not font-locked properly
Sun, 02 Mar 2014 17:03:10 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
On 02.03.2014 13:03, Bozhidar Batsov wrote:
Native regexp support is preferable IMO. After all - regexps are not
strings. If they were treated differently we’d also be able to have
extra highlighting for things like named groups, quantifiers, regexp
classes, etc. I guess, however, that this would require a lot of work.
Since the regexp syntax can be different between languages, we probably
won't get all of that automatically. The direct benefits from the native
support I can see is highlighting comments (for regexps with appropriate
modifiers, in languages that support that), new faces for regexp itself,
and maybe for groups, quantifiers, etc.
The highlighting of the elements inside regexp would probably have to be
done the old-fashioned way, in font-lock-keywords (although that code
could be shared between many languages). We could implement something
like it right now, the main difference is just the lack of standard faces.