Skip to content

Commit

Permalink
Fix repeated regex handling with newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Nov 11, 2019
1 parent 5ad88c9 commit fe7f89f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin.ts
Expand Up @@ -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`
}

Expand Down

0 comments on commit fe7f89f

Please sign in to comment.