forked from forgejo/forgejo
models/action.go: mirror fix on #892
- modules/base/markdown.go: fix issue link issue - routers/repo/view.go: remove useless code
This commit is contained in:
parent
0669897226
commit
afccd0a3ee
3 changed files with 14 additions and 24 deletions
|
@ -177,8 +177,8 @@ func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
|
|||
func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string) []byte {
|
||||
ms := issueIndexPattern.FindAll(rawBytes, -1)
|
||||
for _, m := range ms {
|
||||
rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(
|
||||
`<a href="%s/issues/%s">%s</a>`, urlPrefix, m[1:], m)), -1)
|
||||
rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(`<a href="%s/issues/%s">%s</a>`,
|
||||
urlPrefix, strings.TrimPrefix(string(m[1:]), "#"), m)), -1)
|
||||
}
|
||||
return rawBytes
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue