Start work on porting hints kitten to Go

This commit is contained in:
Kovid Goyal
2023-03-08 20:06:26 +05:30
parent bcd3802d3e
commit 09ceb3c0be
12 changed files with 523 additions and 12 deletions

View File

@@ -80,7 +80,7 @@ func replace_all_rst_roles(str string, repl func(rst_format_match) string) strin
m.role = groupdict["role"].Text
return repl(m)
}
return utils.ReplaceAll(":(?P<role>[a-z]+):(?:(?:`(?P<payload>[^`]+)`)|(?:'(?P<payload>[^']+)'))", str, rf)
return utils.ReplaceAll(utils.MustCompile(":(?P<role>[a-z]+):(?:(?:`(?P<payload>[^`]+)`)|(?:'(?P<payload>[^']+)'))"), str, rf)
}
func (self *Context) hyperlink_for_url(url string, text string) string {