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

Comments

Projects
None yet
5 participants
@ALTree
Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Aug 17, 2016

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

@biztos

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link
Member

commented Jan 6, 2017

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

@broady broady closed this 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.
You can’t perform that action at this time.