mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-13 17:50:34 +08:00
Chore: transform rule type to uppercase before process
This commit is contained in:
parent
30077a4bb0
commit
f301cb4125
@ -201,7 +201,7 @@ export class FileOutput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const splitted = line.split(',');
|
const splitted = line.split(',');
|
||||||
const type = splitted[0];
|
const type = splitted[0].toUpperCase();
|
||||||
const value = splitted[1];
|
const value = splitted[1];
|
||||||
const arg = splitted[2];
|
const arg = splitted[2];
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ export default async function runAgainstSourceFile(
|
|||||||
|
|
||||||
if (type === 'ruleset') {
|
if (type === 'ruleset') {
|
||||||
const [ruleType, domain] = l.split(',', 3);
|
const [ruleType, domain] = l.split(',', 3);
|
||||||
switch (ruleType) {
|
switch (ruleType.toUpperCase()) {
|
||||||
case 'DOMAIN': {
|
case 'DOMAIN': {
|
||||||
callback(domain, false);
|
callback(domain, false);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user