(labels: Iterable[str], prefix: str)
| 167 | |
| 168 | |
| 169 | def label_value(labels: Iterable[str], prefix: str) -> str | None: |
| 170 | prefix_lower = prefix.casefold() |
| 171 | for label in labels: |
| 172 | if label.casefold().startswith(prefix_lower): |
| 173 | _, value = label.split(':', 1) |
| 174 | return value.strip() |
| 175 | return None |
| 176 | |
| 177 | |
| 178 | def markdown_sections(body: str) -> dict[str, str]: |
no test coverage detected