MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / modifyRule

Function modifyRule

Rewrite-Parser.js:3159–3169  ·  view source on GitHub ↗
(input, platform, flags)

Source from the content-addressed store, hash-verified

3157}
3158
3159function modifyRule(input, platform, flags) {
3160 try {
3161 const tree = parseRule(input)
3162 if (tree) {
3163 return generateRule(tree, platform, flags)
3164 }
3165 } catch (e) {
3166 console.log(e)
3167 shNotify(`修改规则发生错误 ${e.message} 请查看日志`)
3168 }
3169}
3170
3171// Surge 现在支持使用 ' 或 " 来包裹字段。当使用 ' 时," 为合法字符,反之亦然
3172

Callers 1

Rewrite-Parser.jsFile · 0.70

Calls 4

parseRuleFunction · 0.70
generateRuleFunction · 0.70
shNotifyFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected