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

Open
DevDorrejo opened this issue Jul 8, 2022 · 3 comments
Open

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

DevDorrejo opened this issue Jul 8, 2022 · 3 comments

Comments

@DevDorrejo
Copy link

@DevDorrejo 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

@seankhliao seankhliao commented Jul 8, 2022

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
Contributor

@ianlancetaylor ianlancetaylor commented Jul 8, 2022

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

@DevDorrejo
Copy link
Author

@DevDorrejo DevDorrejo commented Jul 11, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants