docs: Improve Git page (#26566)
Release Notes: - N/A --------- Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
parent
d40f8889b9
commit
f1a9fdddab
3 changed files with 97 additions and 41 deletions
|
@ -31,6 +31,11 @@ impl Template for KeybindingTemplate {
|
|||
let action = args.get("action").map(String::as_str).unwrap_or("");
|
||||
let macos_binding = context.find_binding("macos", action).unwrap_or_default();
|
||||
let linux_binding = context.find_binding("linux", action).unwrap_or_default();
|
||||
|
||||
if macos_binding.is_empty() && linux_binding.is_empty() {
|
||||
return "<div>No default binding</div>".to_string();
|
||||
}
|
||||
|
||||
format!("<kbd class=\"keybinding\">{macos_binding}|{linux_binding}</kbd>")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue