SDK Bug -> Plugin Dev -> search.findALL


#1

Per sdk/api documentation the findAll command on the Ace editor should return an array of Ranges. However I am only getting back the count objects found…

Here is my code:

var rgba = /rgba\(\s*(?:(\d{1,3})\s*,?){4}\)/g;
var ranges = ace.findAll(rgba,{
    regExp: true,
});

Thanks for any help!


#2

That doc is broken, findAll is used by findAll command to select all the instances. Could you give a link to that documentation page?

Note that if you are trying to add markers for all the colors, searching whole file is not the best approach, as it will slow down the editor.


#3

Docs here:

https://ace.c9.io/api/search.html

And

https://ace.c9.io/#nav=api&api=search

The find all command was an approach for a one time user initiated highlight all command. I’m hoping to implement something more elegant for on doc change, etc…