Code fences don't seem to deal with C comments

Hey there! The author of highlight.js here :slight_smile:

@codinghorror is spot on: indeed this code is recognized as something else because there’s enough of interesting stuff happening within the comment. This is one of the cases where heuristics fails and that’s why we have the ability to set the language explicitly — don’t refrain from using it!

Having said that, I think it will be possible to improve our heuristics across the board so highlighting of this comment will probably be fixed as a side effect.

8 Likes