With the mode js-ts-mode, matching tokens (such as '()', '[]') can be
incorrectly paired by `show-paren-mode`. This is trivially reproducible
with this simple example:
(/foobar)/)
The first parenthesis is matched with the second one, which is inside a
regular expression pattern (between slashes), and the last one is not
paired.
The behavior should be the same as for string, the content of the regex
pattern should have no influence on the structure of the code. The first
parenthesis should match with the third one. Here, the first parenthesis
is matched with the last one:
("foobar)")
js-mode behaves correctly in both cases.