Use a special role for actions documentation

This commit is contained in:
Kovid Goyal
2022-02-04 18:24:39 +05:30
parent 94898a8758
commit b5676a53ee
7 changed files with 30 additions and 11 deletions

View File

@@ -66,6 +66,9 @@ def remove_markup(text: str) -> str:
if m.group(1) == 'ref':
q = m.group(2).split('<')[-1].rstrip('>')
return ref_map()[q]
if m.group(1) == 'ac':
q = m.group(2).split('<')[-1].rstrip('>')
return ref_map()[f'action-{q}']
return str(m.group(2))
return re.sub(r':([a-zA-Z0-9]+):`(.+?)`', sub, text, flags=re.DOTALL)