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: Go source files format misses one tabulation on firefox #23500

Closed
yansal opened this issue Jan 21, 2018 · 11 comments
Closed

x/tools/godoc: Go source files format misses one tabulation on firefox #23500

yansal opened this issue Jan 21, 2018 · 11 comments

Comments

@yansal
Copy link
Contributor

yansal commented Jan 21, 2018

Does this issue reproduce with the latest release?

Yes

What did you do?

Visit https://golang.org/src/errors/errors.go with Firefox.

macOS 10.13.2
Chrome 63.0.3239.132
Firefox 57.0.4

What did you expect to see?

What can be seen with Chrome, see screenshot.

screen shot 2018-01-22 at 12 23 06 am

What did you see instead?

The Go source files format misses one tabulation, see screenshot.

screen shot 2018-01-22 at 12 21 32 am

@gopherbot gopherbot added this to the Unreleased milestone Jan 21, 2018
@pciet
Copy link
Contributor

pciet commented Jan 22, 2018

I see it with the same Firefox on macOS 10.12.6. Chrome here also appears ok.

Adding a white-space CSS property to the pre tag has this behavior when set to pre and pre-wrap. pre-line adds an indentation back in but causes white-space problems with the line numbers.

screen shot 2018-01-21 at 6 21 48 pm

From https://developer.mozilla.org/en-US/docs/Web/CSS/white-space:

pre
Sequences of whitespace are preserved. Lines are only broken at newline characters in the source and at <br> elements.
pre-wrap
Sequences of whitespace are preserved. Lines are broken at newline characters, at <br>, and as necessary to fill line boxes.
pre-line
Sequences of whitespace are collapsed. Lines are broken at newline characters, at <br>, and as necessary to fill line boxes.

This looks like a Firefox problem. <pre> should have white-space: pre; set by default and this page doesn't override that. No property is displayed in the inspector until added manually, but anything non-pre doesn't have this behavior.

I'm not seeing anything for this here: https://bugzilla.mozilla.org/buglist.cgi?quicksearch=white-space. If nothing different is found and somebody with a Bugzilla account doesn't do it first I'll open up a bug there this week.

@agnivade
Copy link
Contributor

agnivade commented Jan 22, 2018

This seems to be a macOS+FF problem. In my ubuntu 16.04+FF 57.0.4, it works fine.

Update - Tested with Windows 10 + FF 57.0.4. Works fine there too.

@cznic
Copy link
Contributor

cznic commented Jan 22, 2018

Works fine here: OpenSuse Leap 42.3 + FF 52.5.3 (64-bit).

@pciet
Copy link
Contributor

pciet commented Jan 22, 2018

@agnivade which FF?

@agnivade
Copy link
Contributor

@pciet - updated my comment.

@pciet
Copy link
Contributor

pciet commented Jan 22, 2018

@andybons andybons added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 22, 2018
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@pciet
Copy link
Contributor

pciet commented Feb 25, 2018

@gopherbot the bugzilla issue has been put into a component and set to priority 3 but no other progress has been made. There's a smaller example linked there that shows the problem.

@kevinburke
Copy link
Contributor

hmm, gopherbot doesn't seem happy with me trying to reopen this. I want to take a crack at this, it's pretty annoying and I probably wrote the tab-indenting code in the first place so a fix is on me.

@kevinburke kevinburke reopened this Aug 27, 2018
@mikioh mikioh removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 27, 2018
@kevinburke
Copy link
Contributor

So this is weird:

https://jsbin.com/cavayixako/edit?html,output

I can only reproduce it with Menlo, another font does not show the same issue.

With the Menlo font in Firefox, a tab character starting in column 9 has zero width.

I can't reproduce that JSBin in Chrome.

It's a hack but you can work around it by adding another &nbsp; to start the tab character in column 10.

@gopherbot
Copy link

Change https://golang.org/cl/131716 mentions this issue: godoc: fix indenting on Firefox

@golang golang locked and limited conversation to collaborators Aug 30, 2019
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

8 participants