(content)
| 41 | } |
| 42 | |
| 43 | function parseCommentConfig (content) { |
| 44 | const result = {} |
| 45 | if (!content) { return result } |
| 46 | const regex = /mpx_config_(.+?)\s*:(.+)/ |
| 47 | content.split(/\n|\r/).forEach((item) => { |
| 48 | const match = regex.exec(item) |
| 49 | if (match) { |
| 50 | const key = match[1] |
| 51 | const raw = match[2] |
| 52 | try { |
| 53 | const value = JSON.parse(raw.replace(/'/g, '"')) |
| 54 | result[key] = value |
| 55 | } catch (e) { |
| 56 | } |
| 57 | } |
| 58 | }) |
| 59 | return result |
| 60 | } |
| 61 | |
| 62 | function parseStrings (content) { |
| 63 | const output = [] |
no test coverage detected