From 930ad2eb4080077b0711c84f28d7a458c09ed7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Wed, 18 Dec 2019 12:09:05 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=93=9D=20Description=20List=20=3D?= =?UTF-8?q?>=20Descriptions=20(#20316)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: :memo: Description List => Descriptions * Update index.en-US.md --- components/descriptions/index.en-US.md | 2 +- scripts/check-site.js | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/components/descriptions/index.en-US.md b/components/descriptions/index.en-US.md index 0c8e8086f8..a579759cbe 100644 --- a/components/descriptions/index.en-US.md +++ b/components/descriptions/index.en-US.md @@ -1,7 +1,7 @@ --- category: Components type: Data Display -title: Description List +title: Descriptions cols: 1 --- diff --git a/scripts/check-site.js b/scripts/check-site.js index b6811ddf41..7e77aebc35 100755 --- a/scripts/check-site.js +++ b/scripts/check-site.js @@ -34,14 +34,10 @@ describe('site test', () => { }); return resp; }; + const handleComponentName = name => { - const componentMap = { - descriptions: 'description list', - }; - // eslint-disable-next-line no-unused-vars - const [_, componentName] = name.split('/'); - const compName = componentName.toLowerCase().replace('-', ''); - return componentMap[compName] || compName; + const componentName = name.split('/')[1]; + return componentName.toLowerCase().replace('-', ''); }; const expectComponent = async component => {