diff --git a/source/Ox/js/HTML.js b/source/Ox/js/HTML.js index 8511e6ac..e7e6bc8c 100644 --- a/source/Ox/js/HTML.js +++ b/source/Ox/js/HTML.js @@ -403,14 +403,15 @@ /\n```(.*)\n([^`]+)\n```/g, function(match, classname, code) { return '
' + code.trim() + '\n';
+ + (classname ? ' class="' + classname + '"' : '') + '>'
+ + code.trim().replace(/';
}
)
.replace(
/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
function(match, prev, backticks, code, next) {
- return prev + '' + code.trim() + '';
+ return prev + ''
+ + code.trim().replace(/';
}
)
.replace(
@@ -489,7 +490,7 @@
});
});
});
- html = Ox.encodeHTMLEntities(html);
+ html = Ox.encodeHTMLEntities(Ox.decodeHTMLEntities(html));
matches.forEach(function(match, i) {
html = html.replace(new RegExp(salt.join(i)), match);
});