Skip to content

Commit

Permalink
backport go-gitea#27968
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Feb 7, 2024
1 parent 7ed79b7 commit 283cfe0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/markup/orgmode/orgmode.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,6 @@ func (r *Writer) WriteRegularLink(l org.RegularLink) {
if l.Description != nil {
description = r.WriteNodesAsString(l.Description...)
}
fmt.Fprintf(r, `<a href="%s" title="%s">%s</a>`, link, description, description)
fmt.Fprintf(r, `<a href="%s">%s</a>`, link, description)
}
}
4 changes: 2 additions & 2 deletions modules/markup/orgmode/orgmode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ func TestRender_StandardLinks(t *testing.T) {
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer))
}

googleRendered := "<p><a href=\"https://google.com/\" title=\"https://google.com/\">https://google.com/</a></p>"
googleRendered := "<p><a href=\"https://google.com/\">https://google.com/</a></p>"
test("[[https://google.com/]]", googleRendered)

lnk := util.URLJoin(AppSubURL, "WikiPage")
test("[[WikiPage][WikiPage]]",
"<p><a href=\""+lnk+"\" title=\"WikiPage\">WikiPage</a></p>")
"<p><a href=\""+lnk+"\">WikiPage</a></p>")
}

func TestRender_Media(t *testing.T) {
Expand Down

0 comments on commit 283cfe0

Please sign in to comment.