showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.26k stars 1.56k forks source link

Code blocks generate with quotes around the contents, breaking highlightjs #825

Closed DoubleF3lix closed 4 years ago

DoubleF3lix commented 4 years ago

Loading an MD file with

```json
{
  "hello": "world"
}
``` (github markdown breaks without this text)

produces

<pre>
  <code language="language-json json">
    "{
      "hello": "world"
      }"
  </code>
</pre>

This causes highlight.js to not highlight the code block properly. Manually adding the element without the quotes highlights correctly.

DoubleF3lix commented 4 years ago

Apparently this isn't the cause of the issue I'm having, even though highlighting is still wonky.