diff --git a/src/views/editCode/cmView.vue b/src/views/editCode/cmView.vue index 20e8fd1af..a14444049 100644 --- a/src/views/editCode/cmView.vue +++ b/src/views/editCode/cmView.vue @@ -186,7 +186,7 @@ const getjsjson = (res) => { // if (props.isJS) return false; try { const jsRegex = - /(?:function|var|let|const|if|else|return|try|catch|finally|typeof|delete|async|await)\b/; + /(?:function|var|let|const|if|else|return|try|catch|finally|typeof|delete|async|await)\s/; if (jsRegex.test(res.slice(0, 4000))) { setHJ(); console.log("---setHJ");