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

Add syntax highlighting to code examples in docs #1156

Closed
trosel opened this issue Jan 23, 2017 · 14 comments
Closed

Add syntax highlighting to code examples in docs #1156

trosel opened this issue Jan 23, 2017 · 14 comments
Assignees

Comments

@trosel
Copy link
Contributor

trosel commented Jan 23, 2017

Syntax highlighting to code examples (especially in tutorials) would help with readability / helping beginners see that it's not just line noise.

@coke
Copy link
Collaborator

coke commented Jan 23, 2017

We are already doing syntax highlighting.

Feel free to re-open if you have a specific example that isn't getting syntax highlighting.

@coke coke closed this as completed Jan 23, 2017
@trosel
Copy link
Contributor Author

trosel commented Jan 23, 2017

It must have broken everywhere then.

You can see my UA info here: http://www.whatsmyua.com/#Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

And you can see a screenshot below.

2017-01-23 13_59_26-object orientation

@Altai-man
Copy link
Member

I double this issue. I thought highlighting was turned off for some reason. Latest firefox.

I do see highlighting classes in html, but they are still not colored. It used to work for me some time ago.

@Altai-man Altai-man reopened this Jan 23, 2017
@jonathanstowe
Copy link
Contributor

Yeah, I checked earlier, the highlighting transformation appears to be happening in most places but it isn't loading the stylesheet I think.

@coke coke added the site label Jan 23, 2017
@coke
Copy link
Collaborator

coke commented Jan 23, 2017

@samcv noted that one of the nodepm packages we depend on changed all their class names without warning. b1d51f1 was supposed to help, but I don't see any changes on the site yet.

@coke
Copy link
Collaborator

coke commented Jan 23, 2017

see also 0193f3e and 9525968

@samcv
Copy link
Collaborator

samcv commented Jan 24, 2017

docs.perl6.org is fixed now as of 9525968
Closing!

@samcv samcv closed this as completed Jan 24, 2017
@trosel
Copy link
Contributor Author

trosel commented Jan 24, 2017

It looks like some are fixed depending on what css is:

image

class="editor editor-colors" works, but class="pod-block-code" does not.

@coke coke reopened this Jan 24, 2017
@samcv
Copy link
Collaborator

samcv commented Jan 24, 2017

That is not the same problem. That is related to what is in the pod6 files the docs are created from. Anything tagged as pod-block-code usually means that's what the block was inside tho doc file

=begin code :allow<B L> that is on the page you showed the screenshot of. If it has :allow then it renders as Pod not as perl 6 code

@samcv samcv closed this as completed Jan 24, 2017
@trosel
Copy link
Contributor Author

trosel commented Jan 24, 2017

@samcv Should it be left open as a "someone can feel free to change this so it's consistent" type of task?

@samcv
Copy link
Collaborator

samcv commented Jan 24, 2017

I think there's another ticket for that, not sure which

@samcv
Copy link
Collaborator

samcv commented Jan 24, 2017

But it's not the original issue, which is why I closed it. It's a separate problem

@samcv
Copy link
Collaborator

samcv commented Jan 24, 2017

If you can't find one, please open an issue for it.
Make sure to paste this into the issue:

The pod6 file has :allow in the code designation:
=begin code :allow<B L> . If it has :allow then it renders as Pod not as perl 6 code

Thanks

@samcv
Copy link
Collaborator

samcv commented Jan 25, 2017

@WildYorkies I have opened an issue here for this https://github.com/perl6/doc/issues/1164

I also wrote my proposed solution for this, and a more detailed explanation of why this currently happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants