diff --git a/packages/replace/src/index.js b/packages/replace/src/index.js index acfb91990..cdbe6419a 100755 --- a/packages/replace/src/index.js +++ b/packages/replace/src/index.js @@ -74,9 +74,10 @@ export default function replace(options = {}) { if (objectGuards) expandTypeofReplacements(replacements); const functionValues = mapToFunctions(replacements); const keys = Object.keys(functionValues).sort(longest).map(escape); - const lookahead = preventAssignment ? '(?!\\s*(=[^=]|:[^:]))' : ''; + const lookbehind = preventAssignment ? '(? Snapshot 1 + + `/* eslint-disable */␊ + first ? second : third;␊ + console.log(first, second, third);` + ## typescript-declare: doesn't replace lvalue in typescript declare > Snapshot 1 diff --git a/packages/replace/test/snapshots/form.js.snap b/packages/replace/test/snapshots/form.js.snap index e907e7442..242f1c08c 100644 Binary files a/packages/replace/test/snapshots/form.js.snap and b/packages/replace/test/snapshots/form.js.snap differ