(args: {
handoff: string;
heading: string;
})
| 116 | } |
| 117 | |
| 118 | function readSectionValue(args: { |
| 119 | handoff: string; |
| 120 | heading: string; |
| 121 | }): string | null { |
| 122 | const re = new RegExp(`^##\\s+${args.heading}\\s*\\r?\\n([^\\r\\n]*)`, "m"); |
| 123 | const match = re.exec(args.handoff); |
| 124 | if (!match) return null; |
| 125 | const raw = match[1].trim(); |
| 126 | if (raw.length === 0) return null; |
| 127 | if (raw.startsWith("##")) return null; |
| 128 | return raw.replace(/^`([^`]+)`$/, "$1").trim(); |
| 129 | } |
| 130 | |
| 131 | function readKeyValue(args: { handoff: string; key: string }): string | null { |
| 132 | const re = new RegExp(`^${args.key}\\s*:\\s*([^\\r\\n]+)`, "im"); |
no outgoing calls
no test coverage detected