fix(client): change repl.it validation to replit for migration (#41457)

This commit is contained in:
Shaun Hamilton
2021-03-15 14:07:43 +00:00
committed by GitHub
parent b2179c5222
commit cd722a0e7f

View File

@ -1,8 +1,8 @@
import React from 'react';
import { Trans } from 'react-i18next';
// Matches editor links for: Repl.it, Glitch, CodeSandbox, GitHub
const editorRegex = /repl\.it\/(@|join\/)|glitch\.com\/edit\/#!|codesandbox\.io\/s\/|github\.com/;
// Matches editor links for: Replit, Glitch, CodeSandbox, GitHub
const editorRegex = /repl\.?it(\.com)?\/(@|join\/)|glitch\.com\/edit\/#!|codesandbox\.io\/s\/|github\.com/;
const fCCRegex = /codepen\.io\/freecodecamp|freecodecamp\.rocks|github\.com\/freecodecamp/i;
const localhostRegex = /localhost:/;
const httpRegex = /http(?!s|([^s]+?localhost))/;