Quantcast
Channel: Active questions tagged code-formatting - Meta Stack Overflow
Viewing all articles
Browse latest Browse all 180

Bug in JavaScript code colors [duplicate]

$
0
0

The following JavaScript code:

let hsv2hsl = (h,s,v,l=v-v*s/2, m=Math.min(l,1-l)) => [h,m?(v-l)/m:0,l];

colors are wrong (starting from /2 which is interpreted as comment):

Light mode:

Enter image description here

Dark mode:

Enter image description here

Update

The duplicate question suggests that I should report this bug directly in the highlight.js GitHub repository - I do it here, but they closed the bug and stated that this will not be fixedhere.

PS: For instance, on JSFiddle, JavaScript coloring works properly - so it is possible.

Enter image description here


Viewing all articles
Browse latest Browse all 180

Trending Articles