Fix JSLint bad escapement warning in RegEx

后端 未结 2 1954
陌清茗
陌清茗 2021-01-15 06:30

I have the following code in a 3rd party jQuery control called jquery.facebox.js that JSLint doesn\'t like. It\'s a bad escapement error i

2条回答
  •  离开以前
    2021-01-15 06:56

    If you define your pattern as a Regex object using / / as enclosures, the double escaping isn't necessary as it is never a string.

提交回复
热议问题