(section_key: str, value: str)
| 522 | ) |
| 523 | |
| 524 | for tokens, normalized in mapping: |
| 525 | if any(token in lowered for token in tokens): |
| 526 | return normalized |
| 527 | |
| 528 | slug = re.sub(r"[^a-z0-9]+", "_", lowered).strip("_") |
| 529 | if not slug: |
| 530 | return "" |
| 531 | return slug[:48] |
| 532 | |
| 533 | |
| 534 | def _extract_source_page_sections_and_full_text( |
| 535 | html: str, |
| 536 | *, |
no test coverage detected