8000 x/pkgsite: RFC section link appears to be broken by newline · Issue #52738 · golang/go · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
x/pkgsite: RFC section link appears to be broken by newline #52738
Closed
@mdlayher

Description

@mdlayher

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/mdlayher/ndp#RouteInformation

What is your user agent?

n/a, server rendering issue

Screenshot

image

What did you do?

Navigated to package docs for my NDP package.

What did you expect to see?

RFC 4191, Section 2.3 presented as a full hyperlink as is done in https://pkg.go.dev/github.com/mdlayher/ndp#PrefixInformation.

What did you see instead?

The RFC section hyperlinking logic appears to be confused by a newline in a doc comment. For example, this works:

// A PrefixInformation is a a Prefix Information option, as described in RFC 4861, Section 4.6.1.
type PrefixInformation struct {
	PrefixLength                   uint8
	OnLink                         bool
	AutonomousAddressConfiguration bool
	ValidLifetime                  time.Duration
	PreferredLifetime              time.Duration
	Prefix                         netip.Addr
}

This does not:

// A RouteInformation is a Route Information option, as described in RFC 4191,
// Section 2.3.
type RouteInformation struct {
	PrefixLength  uint8
	Preference    Preference
	RouteLifetime time.Duration
	Prefix        netip.Addr
}

Note that the RFC section is word wrapped to a new line in the latter case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0