fix(client): replace lookbehind in transformEditorLink (#41889)

This commit is contained in:
Shaun Hamilton
2021-04-22 14:36:33 +01:00
committed by GitHub
parent b439ae7e34
commit 96e8dbc58f

View File

@ -17,11 +17,11 @@ export function isGoodXHRStatus(status) {
export function transformEditorLink(url) { export function transformEditorLink(url) {
return url return url
.replace( .replace(
/(?<=\/\/)(?<projectname>[^.]+)\.(?<username>[^.]+)\.repl\.co\/?/, /(\/\/)(?<projectname>[^.]+)\.(?<username>[^.]+)\.repl\.co\/?/,
'replit.com/@$<username>/$<projectname>' '//replit.com/@$<username>/$<projectname>'
) )
.replace( .replace(
/(?<=\/\/)(?<projectname>[^.]+)\.glitch\.me\/?/, /(\/\/)(?<projectname>[^.]+)\.glitch\.me\/?/,
'glitch.com/edit/#!/$<projectname>' '//glitch.com/edit/#!/$<projectname>'
); );
} }