(heading)
| 104 | } |
| 105 | |
| 106 | function markdownAnchor(heading) { |
| 107 | return heading |
| 108 | .toLowerCase() |
| 109 | .replace(/`/g, "") |
| 110 | .replace(/[^\w\s-]/g, "") |
| 111 | .trim() |
| 112 | .replace(/\s+/g, "-"); |
| 113 | } |
| 114 | |
| 115 | function extractSection(markdown, heading) { |
| 116 | const pattern = new RegExp(`^##\\s+${escapeRegExp(heading)}\\s*$`, "m"); |
no outgoing calls
no test coverage detected