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 examples #3

Open
ben-albrecht opened this issue Feb 8, 2018 · 4 comments
Open

Add syntax highlighting to examples #3

ben-albrecht opened this issue Feb 8, 2018 · 4 comments

Comments

@ben-albrecht
Copy link

Chapel syntax highlighting should work in Jekyll using pygments, as described here.

We should be able to enable syntax highlighting with:

{% highlight chapel %}
// chapel code here
{% endhighlight %}
@jstaf
Copy link
Member

jstaf commented Feb 8, 2018

That sounds great, let's add it in! (I'll admit I didn't realize Chapel syntax highlighting was supported yet)

@tkphd
Copy link
Member

tkphd commented Sep 7, 2018

Invoking pygment directly should work, but it's not how syntax highlighting is handled in the rest of the Carpentries. The more consistent approach would be to modify syntax.css to define a chapel style, then append {: .language-chapel} to the Chapel code blocks.

@ben-albrecht
Copy link
Author

Here is the list of highlighting tools supported by Chapel today:

https://github.com/chapel-lang/chapel/tree/master/highlight

Maybe one of the formats could be easily ported to the format HPC Carpentry uses.

@ben-albrecht
Copy link
Author

Additionally, there are a few highlighting formats that are managed outside of the repository, which are listed in this issue about improving maintenance of syntax highlighting tools for Chapel:

chapel-lang/chapel#5908

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

3 participants