Menu

#484 Unmatched quote in regex breaks symbols list

v1.23
closed-fixed
Filetypes (68)
5
2012-10-26
2010-04-26
Anonymous
No

It's possible that I'm just a noob but a Javascript function with the following regex with an unmatched quote will trip up the Symbols sidebar and it will stop reading any functions after it:

var test = str.match(/test, '/);

Related

Bugs: #981

Discussion

  • Nick Treleaven

    Nick Treleaven - 2010-04-27

    Is it legal Javascript to not close the quote? Could you point to how it should be handled?

     
  • fwsfu

    fwsfu - 2010-05-07

    As far as I know, quotes have no special meaning within a regular expression and shouldn't need to be in matching pairs. I have also found the same issue with double quotes and parenthesis. Parenthesis have special meaning but even escaped it causes the same problem.

    I also discovered a similar issue with the syntax highlighter wanting to see a closing parenthesis inside a regex.

    I would say the solution would be to disable checking for closing marks within a /regular expression/.

     
  • Colomban Wendling

    • labels: 1084466 --> Filetypes
    • milestone: --> v1.23
    • assigned_to: nobody --> colombanw
    • status: open --> closed-fixed
     
  • Colomban Wendling

    Now fixed in Git, thanks for reporting.

     

Log in to post a comment.