SOLVED How to enable code snippet syntax highlighting?


  • Good morning community,

    I'm running nodeBB 1.9.3 and I can't succeed in getting code snippet syntax highlighting in my instance.

    As you can see below using ```ruby on the code snippet "opening" works fine. On my instance instead highlighting doesn't seem to work at all. What could be the cause? Where can i look into?

    require 'redcarpet'
    markdown = Redcarpet.new("Hello World!")
    puts markdown.to_html
    

    This is how my code highlighting box looks like:
    0_1536133777105_Screen Shot 2018-09-05 at 09.47.51.png

    Cheers, KK


  • No ideas community? No hints on what could be the cause and eventually what to check?

    cheers, KK

  • Gamers Anime Lovers

    @KnickKnack Shouldn't Automatically detect and highlight code blocks be checked?


  • Hi @baris, thanks so much.

    I didn't checked it out since I thought it was only enabling automatic syntax detection and not highlighting, but after checking it I got highlighting out of the box for free 🙂

    Cheers, KK

Suggested Topics

  • 10
  • 4
  • 1
  • 6
  • 16
| |