mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 16:53:24 +00:00
allow numbers in variable names
This commit is contained in:
@@ -34,7 +34,7 @@ function extractKey(script: string): [number, number][] | null {
|
|||||||
const switchBody = script.slice(startOfSwitch, endOfCases);
|
const switchBody = script.slice(startOfSwitch, endOfCases);
|
||||||
|
|
||||||
const nums: [number, number][] = [];
|
const nums: [number, number][] = [];
|
||||||
const matches = switchBody.matchAll(/:[a-zA-Z]+=([a-zA-Z]+),[a-zA-Z]+=([a-zA-Z]+);/g);
|
const matches = switchBody.matchAll(/:[a-zA-Z0-9]+=([a-zA-Z0-9]+),[a-zA-Z0-9]+=([a-zA-Z0-9]+);/g);
|
||||||
for (const match of matches) {
|
for (const match of matches) {
|
||||||
const innerNumbers: number[] = [];
|
const innerNumbers: number[] = [];
|
||||||
for (const varMatch of [match[1], match[2]]) {
|
for (const varMatch of [match[1], match[2]]) {
|
||||||
|
Reference in New Issue
Block a user