Improved syntax highlighting for Julia on the web

Now, I found some lexing errors, where should I send the feedbacks?

My fork maybe? Issues · fredrikekre/highlight.js · GitHub

2 Likes

Is it me or recently the GitHub’s rendering of code is not right?

  1. from here

  2. from this

  3. from here

Yes.

Update: The fix is deployed now. Repos with broken highlighting need a commit to invalidate their cache.

2 Likes

the current version of highlight.js does not reproduce the visual of your blog post anymore @fredrikekre , not sure what happened.

Upstream highlight.js does not containt the changes (yet). I hope to do it eventually, but it is pretty easy to compile your own js file based on my branch (see links here).

1 Like

I too want to see Chroma updated, so I went the longer route and have made a PR to pygments which replicates many of the ideas shown here (since I actually do know python). Since chroma advertises an auto-convert of rules from pygments, I’m hoping to just leverage that if/when the pygments PR is merged (and then need to get hugo to use a new version of chroma…)

1 Like

I’ve gotten updated Julia syntax rules merged into both pygments and chroma, so presumably Hugo websites will soon have much better Julia syntax highlighting.

8 Likes

Hi all,

If I want to change the style of say, Julia comments when using hightlight.js, with CSS, I wonder what is the correct way to do it.

For python and javascript, the following works for me, but it doesn’t change the style for Julia comments.

.hljs-comment, .hljs-quote { color: green !important; font-style: italic !important; }


I also commented my question in https://github.com/highlightjs/highlight.js/issues/2832, but realized this may be a better place to ask.

1 Like