/
githubmirror
/
carbon-lang
Обзор
Документация
Войти
/
githubmirror
/
carbon-lang
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
proposals/scripts/utils.py
16 строк
440 B
Chandler Carruth
Make proposal filenames use 6 digits and include the title (#7245)
29 май 2026, 03:55
Не верифицирован
29 май 2026, 03:55
94d2c1c
Код
Авторство
О чём код?
"""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("-")