From 96e8dbc58f674629ece17675cfa1f04e6fce81d0 Mon Sep 17 00:00:00 2001 From: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com> Date: Thu, 22 Apr 2021 14:36:33 +0100 Subject: [PATCH] fix(client): replace lookbehind in transformEditorLink (#41889) --- client/src/templates/Challenges/utils/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/templates/Challenges/utils/index.js b/client/src/templates/Challenges/utils/index.js index 5b3a02ecf3..9f3e73ec28 100644 --- a/client/src/templates/Challenges/utils/index.js +++ b/client/src/templates/Challenges/utils/index.js @@ -17,11 +17,11 @@ export function isGoodXHRStatus(status) { export function transformEditorLink(url) { return url .replace( - /(?<=\/\/)(?[^.]+)\.(?[^.]+)\.repl\.co\/?/, - 'replit.com/@$/$' + /(\/\/)(?[^.]+)\.(?[^.]+)\.repl\.co\/?/, + '//replit.com/@$/$' ) .replace( - /(?<=\/\/)(?[^.]+)\.glitch\.me\/?/, - 'glitch.com/edit/#!/$' + /(\/\/)(?[^.]+)\.glitch\.me\/?/, + '//glitch.com/edit/#!/$' ); }