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

Only highlight raku snippets as raku #199

Closed
coke opened this issue Jul 31, 2017 · 6 comments · Fixed by #264
Closed

Only highlight raku snippets as raku #199

coke opened this issue Jul 31, 2017 · 6 comments · Fixed by #264
Assignees
Labels
build Building the site help wanted Extra attention is needed

Comments

@coke
Copy link
Contributor

coke commented Jul 31, 2017

Code blocks now can have an explicit :lang<> set; if this lang is not Raku, then we should not run the Raku syntax highlighter on those snippets of code. (See, for example, https://docs.perl6.org/language/rb-nutshell, which has many sections that are marked as :lang, and therefore should not get Raku highlighting)

@coke coke added the build Building the site label Jul 31, 2017
@AlexDaniel
Copy link
Member

I wonder, why can't we highlight ruby blocks as ruby code?

@coke coke changed the title Only highlight perl 6 snippets Only highlight perl 6 snippets as perl 6 Jul 31, 2017
@coke
Copy link
Contributor Author

coke commented Aug 2, 2017

Regarding highlighting other blocks in their appropriate languages: ... Sure. It's more work, and if someone wants to do it, more power to them.

@tisonkun
Copy link
Member

tisonkun commented Nov 8, 2017

relevant code snip

https://github.com/perl6/doc/blob/c1a8cd230e807156268c265093b1e8e77b2c1184/htmlify.p6#L929-L955

BTW, how can we get :lang<..> in htmlify.p6?

@coke
Copy link
Contributor Author

coke commented Nov 8, 2017

FWIW, here's the snippet in the examples test that checks whether something is p6 or not:

https://github.com/perl6/doc/blob/master/xt/examples-compilation.t#L50

@JJ
Copy link

JJ commented Mar 16, 2018

Is this a general recommendation or are there specific snippets where it's happening?

@AlexDaniel
Copy link
Member

@JJ yes, all “X to Perl 6” pages are affected. See this as an example: https://docs.perl6.org/language/haskell-to-p6#Ranges (Haskell comments not highlighted as comments).

@JJ JJ self-assigned this Mar 23, 2018
@JJ JJ removed their assignment May 14, 2018
@JJ JJ added the help wanted Extra attention is needed label Jul 3, 2018
@Altai-man Altai-man self-assigned this Nov 7, 2020
@coke coke changed the title Only highlight perl 6 snippets as perl 6 Only highlight raku snippets as raku Jun 18, 2021
@coke coke transferred this issue from Raku/doc Mar 5, 2023
@coke coke closed this as completed in #264 Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Building the site help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants