relnote: use code elements for package headings

The headings for the "minor changes" section are package names,
so render them as code elements.

For golang/go#64169.

Change-Id: Ib2864dd295b11e7a32b7903e06dd6bf721915caf
Reviewed-on: https://go-review.googlesource.com/c/build/+/577300
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
Jonathan Amsterdam 2024-04-08 14:55:49 -04:00
Родитель ce2d00e164
Коммит 2ad3666d6b
4 изменённых файлов: 9 добавлений и 11 удалений

Просмотреть файл

@ -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 + "/",
},
},

Просмотреть файл

@ -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)
}

12
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/)
<!-- https://go.dev/issue/54451, CL 491175 -->
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/)
<!-- https://go.dev/issue/54451, CL 491175 -->
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/)
<!-- https://go.dev/issue/53685, CL 474635 -->
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/)
<!-- https://go.dev/issue/56887, CL 452496 -->
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/)
<!-- https://go.dev/issue/59166, https://go.dev/issue/56539 -->
<!-- CL 471136, CL 471137, CL 471140 -->
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/)
<!-- CL 472636 -->
The new [`ResponseController.EnableFullDuplex`](/pkg/net/http#ResponseController.EnableFullDuplex)

2
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).