Working code!

This commit is contained in:
David Svantesson 2020-01-20 02:10:21 +01:00
parent 6f8a9b445b
commit 65c22ab35a

View File

@ -3,9 +3,9 @@ var plantumlBasePath = "http://www.plantuml.com/plantuml/img/"
var codeBlocks = document.getElementsByClassName("language-plantuml");
for (var i = 0; i < codeBlocks.length; i++) {
s = codeBlocks[i].innerHTML
for (var block_i = 0; block_i < codeBlocks.length; block_i++) {
block_string = codeBlocks[block_i].innerText
//UTF8
s = unescape(encodeURIComponent(s));
codeBlocks[i].innerHTML = "<img src=\"" + plantumlBasePath + encode64(zip_deflate(s, 9)) + ">";
block_string = unescape(encodeURIComponent(block_string));
codeBlocks[block_i].innerHTML = "<img src=\"" + plantumlBasePath + encode64(zip_deflate(block_string, 9)) + "\">";
}