You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Add a [kbd] tag for highlighting keyboard shortcuts in the editor help
This allows backporting documentation from the `master` branch more easily, as it already features the `[kbd]` tag. Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
This commit is contained in:
@@ -1008,6 +1008,12 @@ def rstize_text(text, state): # type: (str, State) -> str
|
||||
tag_depth += 1
|
||||
inside_code = True
|
||||
escape_pre = 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_pre = True
|
||||
|
||||
Reference in New Issue
Block a user