Convert a title to a filesystem-safe slug.
(title: str)
| 52 | |
| 53 | |
| 54 | def _slug(title: str) -> str: |
| 55 | """Convert a title to a filesystem-safe slug.""" |
| 56 | slug = title.lower().strip() |
| 57 | slug = re.sub(r"[^a-z0-9]+", "-", slug) |
| 58 | return slug.strip("-") |
| 59 | |
| 60 | |
| 61 | def _page_path(category: str, slug: str) -> Path: |
no outgoing calls
no test coverage detected