handle
handle

Reputation: 6369

Atom package grammar regular expression flag for case insensitivity

I am following a tuturial on creating a package with grammar for syntax highlighting in Atom. My language is case-insensitive, e.g. define is equivalent to DEFINE.

Atom seems to be running JavaScript regular expressions, but it seems flags are not supported in the cson grammar configuration file

    'match': '(DEFINE)'

It seems there is no documentation about grammars.

How can case-insensitive matching be achieved?

Upvotes: 1

Views: 706

Answers (1)

handle
handle

Reputation: 6369

Use a special group: https://github.com/kkos/oniguruma/blob/master/doc/RE#L197

'match': '(?i)(DEFINE ...

Upvotes: 4

Related Questions