(body)
| 73 | } |
| 74 | |
| 75 | function parseIssueFormSections(body) { |
| 76 | const normalized = normalizeMultilineText(body); |
| 77 | const sections = new Map(); |
| 78 | const matches = [...normalized.matchAll(/^###\s+(.+)$/gm)]; |
| 79 | |
| 80 | for (let index = 0; index < matches.length; index += 1) { |
| 81 | const heading = matches[index][1].trim(); |
| 82 | const start = matches[index].index + matches[index][0].length; |
| 83 | const end = index + 1 < matches.length ? matches[index + 1].index : normalized.length; |
| 84 | const content = normalized.slice(start, end).trim(); |
| 85 | sections.set(heading, content); |
| 86 | } |
| 87 | |
| 88 | return sections; |
| 89 | } |
| 90 | |
| 91 | function normalizeGitHubRepo(value) { |
| 92 | if (!value) { |
no test coverage detected