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: Syntax Highlight example blocks #52198

Closed
Rhymond opened this issue Apr 7, 2022 · 3 comments
Closed

x/pkgsite: Syntax Highlight example blocks #52198

Rhymond opened this issue Apr 7, 2022 · 3 comments

Comments

@Rhymond
Copy link

Rhymond commented Apr 7, 2022

What is the URL of the page with the issue?

Any page containing example block, e.g. https://pkg.go.dev/io#example-Copy

What is your user agent?

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

Screenshot

image

What did you do?

Open package documentation example

What did you expect to see?

Syntax Highlighted code block.

What did you see instead?

A text blob without syntax highlight

@Rhymond Rhymond added the pkgsite label Apr 7, 2022
@gopherbot gopherbot added this to the pkgsite/unplanned milestone Apr 7, 2022
@Rhymond
Copy link
Author

Rhymond commented Apr 7, 2022

#40952 describes similar issue, but with comment code blocks. As I understand correctly it is hard to recognise comment code blocks language, however Example blocks are always (?) written in Go and can be highlighted.

@laoshaw
Copy link

laoshaw commented Aug 7, 2022

many beginners like syntax highlight and golang is designed to be beginner friendly, why is this not even planned? golang is probably the only main language that insists all its doc, website using the plain code snippets, at least make syntax-highlight an opt-in please?

@hyangah
Copy link
Contributor

hyangah commented Oct 6, 2022

Duplicate of #56081

@hyangah hyangah marked this as a duplicate of #56081 Oct 6, 2022
@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.
Projects
None yet
Development

No branches or pull requests

5 participants