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/pkgsite: add support for syntax highlighting of code blocks #40952

Closed
codyoss opened this issue Aug 21, 2020 · 5 comments
Closed

x/pkgsite: add support for syntax highlighting of code blocks #40952

codyoss opened this issue Aug 21, 2020 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite UX Issues that involve UXD/UXR input

Comments

@codyoss
Copy link
Member

codyoss commented Aug 21, 2020

What is the URL of the page with the issue?

Any containing code blocks. Example: https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#hdr-Objects

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36

Screenshot

Screen Shot 2020-08-21 at 9 42 20 AM

What did you do?

Navigate to the page.

What did you expect to see?

Code blocks with syntax highlighting.

What did you see instead?

Code blocks as plain text.

@gopherbot gopherbot added this to the Unreleased milestone Aug 21, 2020
@julieqiu julieqiu added pkgsite NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. UX Issues that involve UXD/UXR input labels Aug 21, 2020
@julieqiu
Copy link
Member

Thanks for the suggestion, @codyoss!

/cc @spf13 @Joanne881107 @fflewddur for product / UX input

@dmitshur
Copy link
Contributor

Note that there also exist some preformated text blocks that don't contain Go code. For example:

image

(Source: https://pkg.go.dev/cmd/asm#hdr-Command_Line)

@codyoss
Copy link
Member Author

codyoss commented Aug 21, 2020

Note that there also exist some preformated text blocks that don't contain Go code

That is a very good point I had not thought of... Might make this quite tricky(infeasible?) as there is no way today to call out what is contained in the block.(i.e. the way markdown supports "```go")

@Groxx
Copy link

Groxx commented Jan 5, 2022

While I would also like this: maybe it's a better fit for a generic syntax highlighter browser plugin? Without code blocks it does seem pretty hard / flaky / possibly frustrating to try to guess and highlight with built-in behavior.

@hyangah
Copy link
Contributor

hyangah commented Oct 6, 2022

Closing in favor of the umbrella issue (#56081).

@hyangah hyangah closed this as completed Oct 6, 2022
@golang golang locked and limited conversation to collaborators Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite UX Issues that involve UXD/UXR input
Projects
None yet
Development

No branches or pull requests

6 participants