Closed jbdoderlein closed 3 years ago
Corrected in #38
I'm just curious, which path did you chose, finally, between "meh" and "oh no" :smile: ?
I chose the "oh no" solution which turned out to be "nice" solution.
I replaced this regex : /((?<=let rec )|(?<=let )|(?<=and ))(\w+\b(?<!\brec))/g
that contains negative lookbehind (not supported in safari)
By these two regex : match(/((let rec \w+)|(let \w+)|(and \w+))/g).map(x=>x.replace(/(let )|(rec )|(and )/g, "")
I thought that because of the map, I would increase a lot the complexity and therefore the time of calculation. In the end it's the opposite that happened, and this solution is 5x faster than the previous one
Nice tweak!
The actual version of betterocaml don't work on Safari because of the lookbehind regex used in autocompletion
Fix : Disable this feature for these browser (meh) or rewrite regex (oh no)