From dcdb81aa808ce23966c4b6d3707674c4a215efc7 Mon Sep 17 00:00:00 2001 From: "Mr.tang" <1074461480@qq.com> Date: Fri, 9 Feb 2018 11:46:47 -0600 Subject: [PATCH] make loop protect work (#535) --- client/modules/IDE/components/PreviewFrame.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index 6144b81d..f0a0255e 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -171,7 +171,7 @@ class PreviewFrame extends React.Component { if (JSHINT.errors.length === 0) { newContent = decomment(newContent, { - ignore: /noprotect/g, + ignore: /\/\/\s*noprotect/g, space: true }); newContent = loopProtect(newContent);