Port recent changes from cli.py to Go

This commit is contained in:
Kovid Goyal
2022-08-24 15:11:08 +05:30
parent 9d56f8eed2
commit 7bb310d3af
3 changed files with 30 additions and 3 deletions

View File

@@ -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":