balanced-match
balanced-match copied to clipboard
Broken regex implementation
do you support this use-case?
If the str
contains more a
than b
/ there are unmatched pairs, and a and/or b is regex, what's the expected behaviour?
i think this should be covered by your other pull requests already, right?
also if you want, i'd be happy to add you as a collaborator on this project
I don't think this is covered? Which one did you refer to?
Happy to contribute to this anyhow 😄
doesn't this cover that?
If the str contains more a than b / there are unmatched pairs, the first match that was closed will be used. For example, {{a} will match ['{', 'a', ''] and {a}} will match ['', 'a', '}'].
Oh not with a
or b
as regex. Also that was just a missing test.
BTW just realise you didn't enable travis.
This is supposed to be a failure test.
i enabled travis now, no clue why it was disabled...
Basically regex only works for very simple use-cases. In order to support all, I think it will be very complicated and performance might be questionable.