in parseMarkdown, don't write empty class for code blocks, and don't encode their content

This commit is contained in:
rolux 2012-05-30 19:21:59 +02:00
parent e9fb83c578
commit bff20cd96a

View file

@ -380,8 +380,8 @@
.replace(
/\n```(.*)\n([^`]+)\n```/g,
function(match, a, b) {
return '<pre><code class="'+ a + '">'
+ Ox.encodeHTMLEntities(b) + '\n</code></pre>';
return '<pre><code' + (a ? ' class="' + a + '"' : '') + '>'
+ b + '\n</code></pre>';
}
)
.replace(