Bad escaping of EOL

后端 未结 2 1345
独厮守ぢ
独厮守ぢ 2021-02-18 21:26

I am trying to work with a simple WYSIWYG editor. JSLint is saying it has \"Bad escaping of EOL\". Since I am new to javascript I am having a hard time figuring out what it mean

2条回答
  •  别跟我提以往
    2021-02-18 22:23

    You have two options:

    1) activate multistr: true as suggested by @csharpfolk. (You can do it at file level by adding /*jshint multistr: true */ or add it in your linter config file (.jshintrc, .eslintrc, etc.)).

    2) Replace your multistring as suggested by @Altinak or use an array and join:

    ["string 1", "string 2", "string 3", ].join('')

提交回复
热议问题