What's wrong with the highlight?


Hi there!

I have the last version of the Hugo and I’m a big fan but I’m not a it-scientist-yada-yada.

And I get an issue like this


Whats wrong? I undestand that it’s an open source but I can’t fix this shortly.

The cofig

My config has the next line


An usual file


You can test it on your configuration.

The problem

The highlight doesn’t work correctly.

What’s wrong and how can I fix this?


Can you share you site code? Or create a small sample project that reproduces the issue, and share that?


The markup rederer tryes to change 5/6 to a fraction layout.

Check your CSS for sub


Of course.

You can check the full example from here https://gist.github.com/oshliaer/ec3c769f7081c229ffdf711a09e49d7c

Also I published a site https://whats-wrong-with-the-highlight.surge.sh/



title: "The Chroma example"

date: 2018-12-06T21:10:28+03:00


# The Chroma example

{{ < highlight js > }}

textStyleBuilder.setForegroundColor(360 * i / text.length | 0);


{{ < / highlight > }}



title: "The Fences example"

date: 2018-12-06T21:10:28+03:00


# The Fences example


textStyleBuilder.setForegroundColor(360 * i / text.length | 0);



Another pic



Sorry Im completely confused.


You should open this issue on https://github.com/alecthomas/chroma.

Hugo uses Chroma for syntax highlighting by default (I am assuming that you are using Chroma and not Pygments).

To clarify, I don’t know JS. But if

textStyleBuilder.setForegroundColor(360 * i / text.length | 0);

is a valid JS snippet, and you are getting that red highlights, then you should open an issue on the Chroma repo.


May be it is the same issue as:

If so, voice your issue in that same thread.



Thank you so much! Now I begin to understand what’s what!
I appreciate your help.

Best wishes!