Substituting a sequence of glyphs using lookup / sub in `calt`

I want to replace a continuous run of ‘=’ glyphs (any length) followed by a ‘>’ glyph with alternative equals signs.

So I started writing this in calt:

lookup longarrows {
sub equal' equal equal equal equal greater by equal.alternate;
sub equal' equal equal equal greater by equal.alternate;
sub equal' equal equal greater by equal.alternate;
sub equal' equal greater by equal.alternate;
sub equal' greater by equal.alternate;
sub equal.alternate greater' by greater.alternate;
} longarrows;

which works. But this will only do 5 in a row.

I don’t mind writing a few hundred or so extra lines, but I can’t help thinking there’s a better way to specify a run… ?

You might be able to write a reverse substitution. Haven’t done that in a long time so you need to check the spec for details.

Thanks Georg, I’ll have a read…

Does Glyphs support rsub? I couldn’t find something that worked…

It should. But it seems to need to have a look.