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: line numbers are copied when highlighting text #20077

Closed
kevinburke opened this issue Apr 22, 2017 · 3 comments
Closed

x/tools/cmd/godoc: line numbers are copied when highlighting text #20077

kevinburke opened this issue Apr 22, 2017 · 3 comments

Comments

@kevinburke
Copy link
Contributor

kevinburke commented Apr 22, 2017

I thought I fixed this in golang/tools@0a14ca4, but copying source code with the latest tip also copies the line numbers, in Chromium on my Mac. Maybe a regression, or maybe a different CSS change caused this to break.

@kevinburke kevinburke self-assigned this Apr 22, 2017
@gopherbot gopherbot added this to the Unreleased milestone Apr 22, 2017
@kevinburke
Copy link
Contributor Author

Github does some hacks with CSS ::before to avoid line number copies, I think I will do the same.

@gopherbot
Copy link
Contributor

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

@kevinburke
Copy link
Contributor Author

kevinburke commented Apr 22, 2017 via email

@golang golang locked and limited conversation to collaborators Apr 25, 2018
henderjon pushed a commit to oggodoc/godoc that referenced this issue Jun 13, 2024
Insert line numbers via a ::before pseudo-element so you can't select
them when you copy text. See the code comment for more information.

Fixes golang/go#20077.

Change-Id: I24a5b17786a52c8107b4f830e824526ba03bc38d
Reviewed-on: https://go-review.googlesource.com/41418
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
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

2 participants