When this is converted to an OpenLayers style function using the code in OlStyleUtil
case 'strMatches':
return new RegExp(args[1] as string).test(args[0] as string);
The forward slashes are escaped and no features are matched:
r = new RegExp(args[1])
/\/(bus|bank)\//
// this is what we want
r = new RegExp(/(bus|bank)/)
/(bus|bank)/
// but as a string is passed they are escaped:
r = new RegExp('/(bus|bank)/')
/\/(bus|bank)\//
I presume this is an issue with the mapfile parser rather than the OL parser? How do other parsers store lists for strMatches?
A class such as in the tests at https://github.com/geostyler/geostyler-mapfile-parser/blob/17c74e1001802891c840c66729f0807a4dfbc412/data/mapfiles/point_st_sample_style_tags_single_filter_list.map#L12
Converts to the following GeoStyler style https://github.com/geostyler/geostyler-mapfile-parser/blob/17c74e1001802891c840c66729f0807a4dfbc412/data/styles/point_st_sample_style_tags_single_filter_list.ts#L12
When this is converted to an OpenLayers style function using the code in OlStyleUtil
The forward slashes are escaped and no features are matched:
I presume this is an issue with the mapfile parser rather than the OL parser? How do other parsers store lists for
strMatches
?