-
Couldn't load subscription status.
- Fork 0
Description
Some of our detectors have adopted a strange way of dealing with regexes ie.
/#{ALL_SYMBOLS.map { |s| Regexp.quote(s) }.join('|')}/
This was the case in the relative date detector because in the calculation we do a check if any terms .include? but we can remove this and replace it with =~ which instantly removes 3 lines of code and lots of complication (tested and proven to work!)
The detectors that use this style of filtering are:
- currency detector
- invoice number label detector
- relative date detector
I've tested removing it from the relative date detector and it works. The due date label detector contains the same logic but also works without it. Please investigate and save our detectors from unnecessary code! 👏