Loading ...
Sorry, an error occurred while loading the content.

Bug: String continuation isn't recognised

Expand Messages
  • emmett.thesane
    If I put this bit of working javascript into the current version of JSLint (Edition 2011-04-19): var s = foo bar ; ...it says: Error: Problem at line 1
    Message 1 of 2 , Apr 21, 2011
    • 0 Attachment
      If I put this bit of working javascript into the current version of JSLint (Edition 2011-04-19):

      var s = 'foo\
      bar';

      ...it says:

      Error:
      Problem at line 1 character 14: Unexpected '\'.
      var s = 'foo\
      Problem at line 1 character 9: Unclosed string.
      var s = 'foo\

      Though you can argue that string continuation is Bad (I generally would), it should be at least identified and hand-slapped.
    • Douglas Crockford
      ... Fix your code.
      Message 2 of 2 , Apr 21, 2011
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "emmett.thesane" <emmett.thesane@...> wrote:

        > Though you can argue that string continuation is Bad (I generally
        > would), it should be at least identified and hand-slapped.

        Fix your code.
      Your message has been successfully submitted and would be delivered to recipients shortly.