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: incorrect rendering of old doc comments #53759

Closed
DevDorrejo opened this issue Jul 8, 2022 · 4 comments
Closed

x/pkgsite: incorrect rendering of old doc comments #53759

DevDorrejo opened this issue Jul 8, 2022 · 4 comments

Comments

@DevDorrejo
Copy link

DevDorrejo commented Jul 8, 2022

What is the URL of the page with the issue?

https://pkg.go.dev/fmt

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36 Edg/102.0.1245.33

Screenshot

image

What did you do?

The information in the website is incomplete in the other flags section compared to: https://golang.google.cn/pkg/fmt/

What did you expect to see?

Other flags:

+	always print a sign for numeric values;
	guarantee ASCII-only output for %q (%+q)
-	pad with spaces on the right rather than the left (left-justify the field)
#	alternate format: add leading 0b for binary (%#b), 0 for octal (%#o),
	0x or 0X for hex (%#x or %#X); suppress 0x for %p (%#p);
	for %q, print a raw (backquoted) string if strconv.CanBackquote
	returns true;
	always print a decimal point for %e, %E, %f, %F, %g and %G;
	do not remove trailing zeros for %g and %G;
	write e.g. U+0078 'x' if the character is printable for %U (%#U).
' '	(space) leave a space for elided sign in numbers (% d);
	put spaces between bytes printing strings or slices in hex (% x, % X)
0	pad with leading zeros rather than spaces;
	for numbers, this moves the padding after the sign

What did you see instead?

Other flags:

  • always print a sign for numeric values; guarantee ASCII-only output for %q (%+q)

  • pad with spaces on the right rather than the left (left-justify the field) # alternate format: add leading 0b for binary (%#b), 0 for octal (%#o), 0x or 0X for hex (%#x or %#X); suppress 0x for %p (%#p); for %q, print a raw (backquoted) string if strconv.CanBackquote returns true; always print a decimal point for %e, %E, %f, %F, %g and %G; do not remove trailing zeros for %g and %G; write e.g. U+0078 'x' if the character is printable for %U (%#U). ' ' (space) leave a space for elided sign in numbers (% d); put spaces between bytes printing strings or slices in hex (% x, % X) 0 pad with leading zeros rather than spaces; for numbers, this moves the padding after the sign

@gopherbot gopherbot added this to the Unreleased milestone Jul 8, 2022
@seankhliao seankhliao changed the title x/pkgsite:fmt x/pkgsite: incorrect rendering of old doc comments Jul 8, 2022
@seankhliao
Copy link
Member

The 1.19 docs render correctly: https://pkg.go.dev/fmt@go1.19beta1

Looks like a poor interaction with the old format

@ianlancetaylor
Copy link
Member

Pretty sure this is fixed on tip, though, so it's a temporary issue.

@DevDorrejo
Copy link
Author

thanks, i am new, so this issue make a little hard to learn, lucky someone point me to the right doc, and with that create this post for others like me.

@hyangah
Copy link
Contributor

hyangah commented Oct 14, 2022

This is an unfortunate corner case. We don't have a plan to invent a workaround, so closing.
All pkg docs for go1.19 and newer were updated to work with the new styling syntax.

@hyangah hyangah closed this as completed Oct 14, 2022
@golang golang locked and limited conversation to collaborators Oct 14, 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

6 participants