(value, targetApp)
| 2282 | } |
| 2283 | |
| 2284 | function normalizeTemplateValue(value, targetApp) { |
| 2285 | if (!value) return value |
| 2286 | value = stripWrapQuote(value) |
| 2287 | if (targetApp == 'surge-module' || targetApp == 'shadowrocket-module') { |
| 2288 | return value.replace(/(?<!\{)\{([^{}]+)\}(?!\})/g, '{{{$1}}}') |
| 2289 | } |
| 2290 | if (targetApp == 'loon-plugin') { |
| 2291 | return value.replace(/\{\{\{([^{}]+)\}\}\}/g, '{$1}') |
| 2292 | } |
| 2293 | return value |
| 2294 | } |
| 2295 | |
| 2296 | function formatCronexp(value, targetApp) { |
| 2297 | if (!value) return value |
no test coverage detected