Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: RFC section link appears to be broken by newline #52738

Closed
mdlayher opened this issue May 6, 2022 · 2 comments
Closed

x/pkgsite: RFC section link appears to be broken by newline #52738

mdlayher opened this issue May 6, 2022 · 2 comments

Comments

@mdlayher
Copy link
Member

mdlayher commented May 6, 2022

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.

@gopherbot gopherbot added this to the pkgsite/unplanned milestone May 6, 2022
@seankhliao
Copy link
Member

I think the new doc design #51082 drops support for magic RFC links, so not sure if this is intended to work in the future?
ref #48305 (comment)

@jamalc
Copy link

jamalc commented May 13, 2022

Thanks @seankhliao, closing as support for these links is being removed.

@jamalc jamalc closed this as completed May 13, 2022
@golang golang locked and limited conversation to collaborators May 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants