mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
chore: not match non-alphabetical characters
This commit is contained in:
parent
1a435ad32b
commit
d009bdeb17
@ -4,7 +4,7 @@ import glob from 'glob-all'
|
|||||||
|
|
||||||
class TailwindExtractor {
|
class TailwindExtractor {
|
||||||
static extract(content) {
|
static extract(content) {
|
||||||
return content.match(/[A-z0-9-:/]+/g) || []
|
return content.match(/[A-Za-z0-9-:/]+/g) || []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ describe('dynamic routes', () => {
|
|||||||
routerFile = routerFile
|
routerFile = routerFile
|
||||||
.slice(routerFile.indexOf('routes: ['))
|
.slice(routerFile.indexOf('routes: ['))
|
||||||
.replace('routes: [', '[')
|
.replace('routes: [', '[')
|
||||||
.replace(/ _[0-9A-z]+,/g, ' "",')
|
.replace(/ _[0-9A-Za-z]+,/g, ' "",')
|
||||||
routerFile = routerFile.substr(
|
routerFile = routerFile.substr(
|
||||||
routerFile.indexOf('['),
|
routerFile.indexOf('['),
|
||||||
routerFile.lastIndexOf(']') + 1
|
routerFile.lastIndexOf(']') + 1
|
||||||
|
@ -13,7 +13,7 @@ describe('route-name-splitter', () => {
|
|||||||
routerFile = routerFile
|
routerFile = routerFile
|
||||||
.slice(routerFile.indexOf('routes: ['))
|
.slice(routerFile.indexOf('routes: ['))
|
||||||
.replace('routes: [', '[')
|
.replace('routes: [', '[')
|
||||||
.replace(/ _[0-9A-z]+,/g, ' "",')
|
.replace(/ _[0-9A-Za-z]+,/g, ' "",')
|
||||||
routerFile = routerFile.substr(
|
routerFile = routerFile.substr(
|
||||||
routerFile.indexOf('['),
|
routerFile.indexOf('['),
|
||||||
routerFile.lastIndexOf(']') + 1
|
routerFile.lastIndexOf(']') + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user