evilstreak / markdown-js

A Markdown parser for javascript
7.69k stars 863 forks source link

Code Syntax Highlight #303

Open loretoparisi opened 5 years ago

loretoparisi commented 5 years ago

It would be nice to add a minimalist <code/> syntax highlight like the one available in most of markdown editors using the code type like

{
  "key": "I'm a json"
}

when turning a `` into a

`` element. A good example is the [ACE](https://ace.c9.io/) editor that gives support for most of languages. Another great code highlight tool is [Highlight.js](https://highlightjs.org/static/demo/). To support a specific language typically a class will be inferred like in the above example
<code class=json">`