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/tools/cmd/godoc: wrong indentation for inline examples #16746

Closed
ALTree opened this issue Aug 16, 2016 · 5 comments
Closed

x/tools/cmd/godoc: wrong indentation for inline examples #16746

ALTree opened this issue Aug 16, 2016 · 5 comments

Comments

@ALTree
Copy link
Member

ALTree commented Aug 16, 2016

First line is not indented, every other line is. A couple examples:

https://golang.org/pkg/go/printer/#example_Fprint
https://golang.org/pkg/archive/zip/#example_Reader

note the the actual code (in the source file) is correctly indented.

@rakyll rakyll changed the title godoc: wrong indentation for inline examples x/tools/cmd/godoc: wrong indentation for inline examples Aug 16, 2016
@rakyll rakyll self-assigned this Aug 16, 2016
@rakyll rakyll added this to the Unreleased milestone Aug 16, 2016
@rakyll
Copy link
Contributor

rakyll commented Aug 17, 2016

It looks like the tip is working correctly and there has been a line trims the extra whitespace in the pre block at https://github.com/golang/tools/blame/master/godoc/godoc.go#L463.

@broady, are we running an old version of godoc on the website?

@broady
Copy link
Contributor

broady commented Aug 17, 2016

Nope, I deployed it yesterday from release-branch.go1.7

@biztos
Copy link

biztos commented Dec 26, 2016

Hi there. I see this bug still expressed on golang.org but not on godoc.org:

https://godoc.org/go/printer#ex-Fprint

(I had naïvely assumed they used the same code to generate the docs and just differed in the stylesheets, but it seems that's not the case.)

@rakyll rakyll removed their assignment Dec 27, 2016
@ALTree
Copy link
Member Author

ALTree commented Dec 27, 2016

Mmh, I honestly don't remember if godoc.org was affected when I opened this issue; I focused on golang.org because that's where I saw the issue first.

@broady
Copy link
Contributor

broady commented Jan 6, 2017

This will be fixed when Go 1.8 rolls out to golang.org. (~1 March)

@broady broady closed this as completed Jan 6, 2017
@golang golang locked and limited conversation to collaborators Jan 6, 2018
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

5 participants