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/godoc: copying source code should not copy the line numbers as well #18279

Closed
kevinburke opened this issue Dec 10, 2016 · 10 comments
Closed

Comments

@kevinburke
Copy link
Contributor

kevinburke commented Dec 10, 2016

If I go to e.g. https://golang.org/src/path/filepath/path.go?s=4925:4961#L171, and try to copy the source code, the line numbers are included in the highlighted text. In general I'd rather not copy the source code with the line numbers.

If you view the same code on github.com, you can highlight and copy the source code without the line numbers included.

https://github.com/golang/go/blob/master/src/path/filepath/path.go

Happy to work on a fix but it might take a while.

@bradfitz bradfitz changed the title godoc: Copying source code should not copy the line numbers as well x/tools/godoc: copying source code should not copy the line numbers as well Dec 10, 2016
@bradfitz bradfitz added this to the Unplanned milestone Dec 10, 2016
@bradfitz
Copy link
Contributor

SGTM.

/cc @broady

@josharian
Copy link
Contributor

This and variants have come up a bunch before. A sample: #4656, #5867, #9042. It'd be awesome to get it fixed broadly.

@JayNakrani
Copy link
Contributor

After golang.org/cl/34279:
screen shot 2016-12-10 at 10 16 10 pm

@gopherbot
Copy link

CL https://golang.org/cl/34279 mentions this issue.

@kevinburke
Copy link
Contributor Author

kevinburke commented Dec 11, 2016 via email

@JayNakrani
Copy link
Contributor

Ah, never mind. Just saw Kevin's change at http://golang.org/cl/34278

@JayNakrani
Copy link
Contributor

Yes, abandoned my change. gopherbot's mention would have saved effort on my side 😅

@bradfitz
Copy link
Contributor

Gopherbot works if you make the reference correctly fully qualified. See other commits in history.

@kevinburke
Copy link
Contributor Author

Neat. Thanks!

@gopherbot
Copy link

CL https://golang.org/cl/34278 mentions this issue.

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