mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
Port recent changes from cli.py to Go
This commit is contained in:
parent
9d56f8eed2
commit
7bb310d3af
3 changed files with 30 additions and 3 deletions
|
|
@ -273,7 +273,20 @@ func prettify(text string) string {
|
|||
case "env", "envvar":
|
||||
return ref_hyperlink(val, "envvar-")
|
||||
case "doc":
|
||||
text, target := text_and_target(val)
|
||||
if text == target {
|
||||
target = strings.Trim(target, "/")
|
||||
if title, ok := kitty.DocTitleMap[target]; ok {
|
||||
val = title + " <" + target + ">"
|
||||
}
|
||||
}
|
||||
return ref_hyperlink(val, "doc-")
|
||||
case "iss":
|
||||
return ref_hyperlink(val, "issues-")
|
||||
case "pull":
|
||||
return ref_hyperlink(val, "pull-")
|
||||
case "disc":
|
||||
return ref_hyperlink(val, "discussions-")
|
||||
case "ref":
|
||||
return ref_hyperlink(val, "")
|
||||
case "ac":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue