"""Shared utilities for proposal scripts.""" __copyright__ = """ Part of the Carbon Language project, under the Apache License v2.0 with LLVM Exceptions. See /LICENSE for license information. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """ import re def slugify(title: str) -> str: """Returns a robust slug of the title.""" slug = title.lower() slug = re.sub(r"[^a-z0-9]+", "-", slug) return slug.strip("-")