[RISCV] Regenerate autogen test to remove spurious diff
[llvm-project.git] / llvm / docs / llvm_slug.py
blob9dd8b1cd3f1aacd3adb6f1f5040d3aac43f5c00b
1 # -*- coding: utf-8 -*-
3 # LLVM documentation anchor slug formatting
5 # Some of our markdown documentation numbers section titles
6 # This helpers is used by myst to remove that numbering from the anchor links.
8 from docutils.nodes import make_id
11 def make_slug(str):
12 import re
14 str = re.sub(r"^\s*(\w\.)+\w\s", "", str)
15 str = re.sub(r"^\s*\w\.\s", "", str)
16 return make_id(str)