Convert text to URL-safe slug.
(self, text: str)
| 177 | return t.strip() |
| 178 | |
| 179 | def slugify(self, text: str) -> str: |
| 180 | """Convert text to URL-safe slug.""" |
| 181 | text = text.lower() |
| 182 | text = re.sub(r"[^\w\s-]", "", text) |
| 183 | text = re.sub(r"[\s_]+", "-", text) |
| 184 | text = re.sub(r"-+", "-", text) |
| 185 | return text.strip("-")[:80] |
| 186 | |
| 187 | def build_front_matter(self, doc: dict, output_path: str, regulation: str) -> dict: |
| 188 | """Build YAML front matter metadata from WordPress doc.""" |
no outgoing calls
no test coverage detected