From 7713bffdc018a4bf9da5620457f8227ca472464d Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 17 Nov 2020 18:49:46 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=B0=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mitmproxy/test/{matchTest.mjs => matchTest.js} | 3 +++ 1 file changed, 3 insertions(+) rename packages/mitmproxy/test/{matchTest.mjs => matchTest.js} (65%) diff --git a/packages/mitmproxy/test/matchTest.mjs b/packages/mitmproxy/test/matchTest.js similarity index 65% rename from packages/mitmproxy/test/matchTest.mjs rename to packages/mitmproxy/test/matchTest.js index 56898a83..44cd1eca 100644 --- a/packages/mitmproxy/test/matchTest.mjs +++ b/packages/mitmproxy/test/matchTest.js @@ -2,3 +2,6 @@ const name = '/docmirror/dev-sidecar/raw/master/doc/index.png' // https://raw.fastgit.org/docmirror/dev-sidecar/master/doc/index.png const ret = name.replace(/^(.+)\/raw\/(.+)$/, 'raw.fastgit.org$1/$2') console.log(ret) + +const reg = new RegExp('^/[^/]+/[^/]+$') +console.log('/greper/d2-crud-plus/blob/master/.eslintignore'.match(reg))