Working code!
This commit is contained in:
parent
6f8a9b445b
commit
65c22ab35a
@ -3,9 +3,9 @@ var plantumlBasePath = "http://www.plantuml.com/plantuml/img/"
|
|||||||
|
|
||||||
var codeBlocks = document.getElementsByClassName("language-plantuml");
|
var codeBlocks = document.getElementsByClassName("language-plantuml");
|
||||||
|
|
||||||
for (var i = 0; i < codeBlocks.length; i++) {
|
for (var block_i = 0; block_i < codeBlocks.length; block_i++) {
|
||||||
s = codeBlocks[i].innerHTML
|
block_string = codeBlocks[block_i].innerText
|
||||||
//UTF8
|
//UTF8
|
||||||
s = unescape(encodeURIComponent(s));
|
block_string = unescape(encodeURIComponent(block_string));
|
||||||
codeBlocks[i].innerHTML = "<img src=\"" + plantumlBasePath + encode64(zip_deflate(s, 9)) + ">";
|
codeBlocks[block_i].innerHTML = "<img src=\"" + plantumlBasePath + encode64(zip_deflate(block_string, 9)) + "\">";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user