Commonmark compatible js markdown lib with syntax highlighting support


#1

i need a common mark with syntax hignlighting on client side.
I only found remarkable so far: https://github.com/jonschlinkert/remarkable not sure it is good.

any pointers?


#2

You should be able to use commonmark.js with any js highlighting library you like.

A fenced code block like

``` ruby
x = 2
```

will be rendered as a <pre><code class="language-ruby">. This is all you need for it to work with highlight.js (see its documentation).

+++ v3ss0n [May 14 15 10:07 ]:


#3

Ah thanks a lot for replying man, i am a fan of your work. Just i was looking around others because i thought spec implementations do not support highlighting by default. after looking into how easy it is to integrate highlightjs i will just use commonmarkjs ,