diff --git a/relnote/relnote.go b/relnote/relnote.go index 0012df22..ba48e6f5 100644 --- a/relnote/relnote.go +++ b/relnote/relnote.go @@ -204,7 +204,7 @@ func stdlibPackageHeading(pkg string, lastLine int) *md.Heading { Position: pos, Inline: []md.Inline{ &md.Link{ - Inner: []md.Inline{&md.Plain{Text: pkg}}, + Inner: []md.Inline{&md.Code{Text: pkg}}, URL: "/pkg/" + pkg + "/", }, }, diff --git a/relnote/relnote_test.go b/relnote/relnote_test.go index ee516ef5..15886be8 100644 --- a/relnote/relnote_test.go +++ b/relnote/relnote_test.go @@ -115,9 +115,7 @@ func TestStdlibPackage(t *testing.T) { func TestStdlibPackageHeading(t *testing.T) { h := stdlibPackageHeading("net/http", 1) got := md.ToMarkdown(h) - want := "#### [net/http](/pkg/net/http/)\n" - // TODO(jba): use a code element for the heading; the following is the correct value of "want": - // want := "#### [`net/http`](/pkg/net/http/)\n" + want := "#### [`net/http`](/pkg/net/http/)\n" if got != want { t.Errorf("\ngot %q\nwant %q", got, want) } diff --git a/relnote/testdata/merge/go121.txt b/relnote/testdata/merge/go121.txt index 3326c716..bdd1b9f4 100644 --- a/relnote/testdata/merge/go121.txt +++ b/relnote/testdata/merge/go121.txt @@ -347,7 +347,7 @@ made with the Go 1 [promise of compatibility](/doc/go1compat) in mind. There are also various performance improvements, not enumerated here. -#### [archive/tar](/pkg/archive/tar/) +#### [`archive/tar`](/pkg/archive/tar/) The implementation of the @@ -357,7 +357,7 @@ interface returned by now implements a `String` method that calls [`io/fs.FormatFileInfo`](/pkg/io/fs/#FormatFileInfo). -#### [archive/zip](/pkg/archive/zip/) +#### [`archive/zip`](/pkg/archive/zip/) The implementation of the @@ -367,7 +367,7 @@ interface returned by now implements a `String` method that calls [`io/fs.FormatFileInfo`](/pkg/io/fs/#FormatFileInfo). -#### [bytes](/pkg/bytes/) +#### [`bytes`](/pkg/bytes/) The [`Buffer`](/pkg/bytes/#Buffer) type @@ -379,7 +379,7 @@ These may be used along with the method to append directly to the `Buffer`. ways different. -#### [debug/elf](/pkg/debug/elf/) +#### [`debug/elf`](/pkg/debug/elf/) The constant flags permitted in a `DT_FLAGS_1` @@ -401,14 +401,14 @@ given dynamic tag. The package now defines the constant [`R_PPC64_REL24_P9NOTOC`](/pkg/debug/elf/#R_PPC64_REL24_P9NOTOC). -#### [net](/pkg/net/) +#### [`net`](/pkg/net/) On Linux, the [net](/pkg/net/) package can now use Multipath TCP when the kernel supports it. -#### [net/http](/pkg/net/http/) +#### [`net/http`](/pkg/net/http/) The new [`ResponseController.EnableFullDuplex`](/pkg/net/http#ResponseController.EnableFullDuplex) diff --git a/relnote/testdata/merge/symbol_links.txt b/relnote/testdata/merge/symbol_links.txt index 607bd865..ff0dca76 100644 --- a/relnote/testdata/merge/symbol_links.txt +++ b/relnote/testdata/merge/symbol_links.txt @@ -12,7 +12,7 @@ like [`bytes.Buffer`](/pkg/bytes#Buffer) and [`bytes.Reader.Read`](/pkg/bytes#Reader.Read). This: s[math] is not a link. -#### [bytes](/pkg/bytes/) +#### [`bytes`](/pkg/bytes/) Inside this file, [`Buffer`](/pkg/bytes#Buffer) can be used instead of [`bytes.Buffer`](/pkg/bytes#Buffer).