evilstreak / markdown-js

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

Code type shows up in the html #239

Closed franzwong closed 6 years ago

franzwong commented 9 years ago

I would like to define a code block with code type (e.g. html, javascript, etc). I don't expect the type will be shown in the output html.

markdown.toHTML('```javascript\nconsole.log("hello");\n```');

Expect:

<p><code>
console.log(&quot;hello&quot;);
</code></p>

Actual:

<p><code>javascript
console.log(&quot;hello&quot;);
</code></p>
coltonbrwn commented 9 years ago

I switched to https://github.com/chjj/marked - better implementation that addresses this issue