From fe7f89ff2a16d627f4190ae7773fe4acbe85062a Mon Sep 17 00:00:00 2001 From: Blake Embrey Date: Mon, 11 Nov 2019 13:38:20 +1100 Subject: [PATCH] Fix repeated regex handling with newlines --- src/bin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin.ts b/src/bin.ts index 7941acf53..91e3340e0 100644 --- a/src/bin.ts +++ b/src/bin.ts @@ -418,7 +418,7 @@ function appendEval (state: EvalState, input: string) { const undoLines = state.lines // Handle ASI issues with TypeScript re-evaluation. - if (undoInput.charAt(undoInput.length - 1) === '\n' && /^\s*[\[\(\`]/.test(input) && !/;\s*$/.test(undoInput)) { + if (undoInput.charAt(undoInput.length - 1) === '\n' && /^\s*[\/\[(`]/.test(input) && !/;\s*$/.test(undoInput)) { state.input = `${state.input.slice(0, -1)};\n` }