1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 19:29:53 +03:00
aports/community/lldb/llvm_slug.py
omni a1f67bb652 community/lldb: upgrade to 19.1.2
add llvm_slug python module from llvm-19.1.2.src.tar.xz
2024-10-30 11:07:30 +00:00

16 lines
394 B
Python

# -*- coding: utf-8 -*-
#
# LLVM documentation anchor slug formatting
# Some of our markdown documentation numbers section titles
# This helpers is used by myst to remove that numbering from the anchor links.
from docutils.nodes import make_id
def make_slug(str):
import re
str = re.sub(r"^\s*(\w\.)+\w\s", "", str)
str = re.sub(r"^\s*\w\.\s", "", str)
return make_id(str)