From d009bdeb17a6e4c656bea0a60300cbbebd4245bf Mon Sep 17 00:00:00 2001 From: Clark Du Date: Tue, 25 Jun 2019 10:52:13 +0100 Subject: [PATCH] chore: not match non-alphabetical characters --- examples/with-purgecss/nuxt.config.js | 2 +- test/unit/dynamic-routes.test.js | 2 +- test/unit/route-name-splitter.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/with-purgecss/nuxt.config.js b/examples/with-purgecss/nuxt.config.js index 26b6617790..86fe4838e3 100644 --- a/examples/with-purgecss/nuxt.config.js +++ b/examples/with-purgecss/nuxt.config.js @@ -4,7 +4,7 @@ import glob from 'glob-all' class TailwindExtractor { static extract(content) { - return content.match(/[A-z0-9-:/]+/g) || [] + return content.match(/[A-Za-z0-9-:/]+/g) || [] } } diff --git a/test/unit/dynamic-routes.test.js b/test/unit/dynamic-routes.test.js index e228381505..74c96c375f 100644 --- a/test/unit/dynamic-routes.test.js +++ b/test/unit/dynamic-routes.test.js @@ -13,7 +13,7 @@ describe('dynamic routes', () => { routerFile = routerFile .slice(routerFile.indexOf('routes: [')) .replace('routes: [', '[') - .replace(/ _[0-9A-z]+,/g, ' "",') + .replace(/ _[0-9A-Za-z]+,/g, ' "",') routerFile = routerFile.substr( routerFile.indexOf('['), routerFile.lastIndexOf(']') + 1 diff --git a/test/unit/route-name-splitter.test.js b/test/unit/route-name-splitter.test.js index 9595788d4d..86cb29d1f9 100644 --- a/test/unit/route-name-splitter.test.js +++ b/test/unit/route-name-splitter.test.js @@ -13,7 +13,7 @@ describe('route-name-splitter', () => { routerFile = routerFile .slice(routerFile.indexOf('routes: [')) .replace('routes: [', '[') - .replace(/ _[0-9A-z]+,/g, ' "",') + .replace(/ _[0-9A-Za-z]+,/g, ' "",') routerFile = routerFile.substr( routerFile.indexOf('['), routerFile.lastIndexOf(']') + 1