Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/cmd/godoc: strange HTML whitespace and indentations in source generated #13944
changed the title
cmd/godoc: Strange HTML whitespace and indentations in source generated
Jan 13, 2016
I took a look into this. This has to do with the "text/template" package. Whitespaces in the source code translate to actual whitespace in the html file. Even assignment statements like
I am not fully sure, but I think using the "html/template" package should help in mitigating this naturally.
Thanks for the report.
As @agnivade said, the underlying issue here is with the template/* packages, which translates source code whitespace to actual whitespace.
I believe the right path forward would be to propose a change to the template package semantics if you’d like this to change (golang.org/s/proposal) since as of now, this is not a bug, but working as intended.