Improve shortcut formatting in docs

This commit is contained in:
Yuri Sizov
2020-03-10 13:41:36 +03:00
parent 35c8ec065c
commit 1ea7295bd2
13 changed files with 63 additions and 40 deletions

View File

@ -901,6 +901,12 @@ def rstize_text(text, state): # type: (str, State) -> str
tag_text = "``"
tag_depth += 1
inside_code = True
elif cmd == "kbd":
tag_text = ":kbd:`"
tag_depth += 1
elif cmd == "/kbd":
tag_text = "`"
tag_depth -= 1
elif cmd.startswith("enum "):
tag_text = make_enum(cmd[5:], state)
escape_post = True