x/website: inconsistent tabs in code snippets #52255
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
website
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
visited go.dev/doc/articles/wiki, go.dev/doc/effective_go, go.dev/doc/code, go.dev/doc/faq, go.dev/ref/mem, and https://go.dev/ref/spec. In some places, real tabs are used instead of 4 spaces. The problem is that the former case is equal to 8 spaces in browsers, but the majority of code on go.dev are rendered using the latter representation, so indentation is not consistent. The following screenshot is taken from go.dev/doc/articles/wiki and contains the first Go code snippet. You can copy the first tab to search for it on other pages

I made 2 PRs because some pages are not in x/website but in this repo instead. To prevent this in future, maybe I can create a test checking contents inside every
<pre>
tag for tabs. I could suggest to create a replacer instead, but there are some cases when it will result in messed indentation, e.g. in the spec. What do you think?What did you expect to see?
consistent indentation
What did you see instead?
inconsistent one
The text was updated successfully, but these errors were encountered: