ToWikiPageName formats a URL back to corresponding wiki page name. It enforces single-level hierarchy by replacing all "/" with spaces.
(urlString string)
| 38 | // ToWikiPageName formats a URL back to corresponding wiki page name. It enforces |
| 39 | // single-level hierarchy by replacing all "/" with spaces. |
| 40 | func ToWikiPageName(urlString string) string { |
| 41 | name, _ := url.QueryUnescape(urlString) |
| 42 | name = pathutil.Clean(name) |
| 43 | return strings.ReplaceAll(name, "/", " ") |
| 44 | } |
| 45 | |
| 46 | // WikiCloneLink returns clone URLs of repository wiki. |
| 47 | // |