mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 08:59:31 -05:00
Fix bad issue links in non-readme markdown files
This commit is contained in:
parent
84a43b38cf
commit
85c58eba90
1 changed files with 3 additions and 0 deletions
|
@ -168,6 +168,9 @@ func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string) []byte {
|
func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string) []byte {
|
||||||
|
// Remove unnecessary things after username and reponame in prefix
|
||||||
|
// (otherwise stuff like /:user/:repo/src/master/issues/1 would happen)
|
||||||
|
urlPrefix = strings.Join(strings.Split(urlPrefix, "/")[:3], "/")
|
||||||
ms := issueIndexPattern.FindAll(rawBytes, -1)
|
ms := issueIndexPattern.FindAll(rawBytes, -1)
|
||||||
for _, m := range ms {
|
for _, m := range ms {
|
||||||
var space string
|
var space string
|
||||||
|
|
Loading…
Reference in a new issue