Exclude comment matches when matching domain matches

This commit is contained in:
bytedream 2022-06-16 16:09:35 +02:00
parent feaf843584
commit f48adc3db3

View File

@ -23,7 +23,7 @@ function getDomains() {
let domains = []
const matchesRegex = new RegExp(/export\s+const\s+matches\s+=\s+(?<matches>\[.*?])/gms)
const matchesClassesRegex = new RegExp(/new\s+(?<class>\w+)\(\)/gms)
const matchesClassesRegex = new RegExp(/(?<!\/\/\s*)new\s+(?<class>\w+)\(\)/gms)
const matchTs = fs.readFileSync('src/match/match.ts')
const jsMatches = matchesRegex.exec(matchTs).groups.matches