(title: str, parent: str | None)
| 246 | order = 0 |
| 247 | |
| 248 | def make_section_key(title: str, parent: str | None) -> str: |
| 249 | # Special cases for unwieldy / ambiguous titles |
| 250 | if parent == "browser-exploitation": |
| 251 | if title.lower().startswith("frontend"): |
| 252 | return "browser-frontend" |
| 253 | if title.lower().startswith("backend"): |
| 254 | return "browser-backend" |
| 255 | base = slugify(title) |
| 256 | if parent in ("evasions", "tricks", "pocs", "tools", "practices"): |
| 257 | if not base.startswith(parent + "-"): |
| 258 | return f"{parent}-{base}" |
| 259 | if parent in ("tools-reconnaissance", "tools-offensive"): |
| 260 | if base.startswith("tools-"): |
| 261 | return base |
| 262 | return f"tools-{base}" |
| 263 | return base |
| 264 | |
| 265 | for idx, line in enumerate(lines): |
| 266 | line_no = idx + 1 |
no test coverage detected