(args, rawDesc)
| 2379 | } |
| 2380 | |
| 2381 | function applySurgeArgumentsDesc(args, rawDesc) { |
| 2382 | const descMap = parseSurgeArgumentsDesc( |
| 2383 | rawDesc, |
| 2384 | args.map(item => item.key) |
| 2385 | ) |
| 2386 | args.forEach(item => { |
| 2387 | const desc = descMap[item.key] |
| 2388 | if (!desc) return |
| 2389 | const { tag } = parseArgumentTagFields(item.tag) |
| 2390 | const firstLine = desc.split(/\r?\n/)[0].trim() |
| 2391 | item.tag = `tag=${tag && tag !== item.key ? tag : firstLine || item.key}, desc=${escapeArgumentDesc(desc)}` |
| 2392 | }) |
| 2393 | } |
| 2394 | |
| 2395 | function rewriteArgumentTagKey(tag, oldKey, newKey) { |
| 2396 | if (!tag || oldKey === newKey) return tag |
no test coverage detected