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