in parseMarkdown, don't write empty class for code blocks, and don't encode their content
This commit is contained in:
parent
e9fb83c578
commit
bff20cd96a
1 changed files with 2 additions and 2 deletions
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue