How to enable code snippet syntax highlighting?

Solved General Discussion
  • #1

    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 ="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

  • #2

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

    cheers, KK

  • NodeBB

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

  • #4

    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

| | | |