mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-01 03:13:15 +08:00
添加四个重命名
This commit is contained in:
@@ -192,7 +192,7 @@ async function parseSub(sub, platform) {
|
||||
} else if (item.type.indexOf("Operator") !== -1) {
|
||||
const operator = AVAILABLE_OPERATORS[item.type];
|
||||
if (operator) {
|
||||
$operator.addOperators(operator(...(item.args || [])));
|
||||
$operator.addOperators(operator(item.args));
|
||||
proxies = $operator.process(proxies);
|
||||
$.log(`Applying operator "${item.type}" with arguments: \n >>> ${item.args || "None"}`);
|
||||
}
|
||||
@@ -1587,7 +1587,7 @@ function KeywordRenameOperator(keywords) {
|
||||
func: proxies => {
|
||||
return proxies.map(proxy => {
|
||||
for (const {old, now} of keywords) {
|
||||
proxy.name = proxy.name.replace(old, now);
|
||||
proxy.name = proxy.name.replace(old, now).trim();
|
||||
}
|
||||
return proxy;
|
||||
})
|
||||
@@ -1603,7 +1603,7 @@ function RegexRenameOperator(regex) {
|
||||
func: proxies => {
|
||||
return proxies.map(proxy => {
|
||||
for (const {expr, now} of regex) {
|
||||
proxy.name = proxy.name.replace(new RegExp(expr, "g"), now);
|
||||
proxy.name = proxy.name.replace(new RegExp(expr, "g"), now).trim();
|
||||
}
|
||||
return proxy;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user