Update source

This commit is contained in:
Kenox 2022-11-04 08:56:32 +01:00
commit 3ceeb5d5db
2 changed files with 5 additions and 4 deletions

View file

@ -283,15 +283,16 @@ haste.prototype.lockDocument = function() {
}
else if (ret) {
//_this.$code.html(htmlEscape(ret.value));
var lines = ret.value.split(/\r\n|\r|\n/);
for (var i = 0; i < lines.length; i++) {
const lines = ret.value.split(/\r\n|\r|\n/);
for (let i = 0; i < lines.length; i++) {
let code = document.createElement('code');
code.innerHTML = lines[i];
let pre = document.getElementById("box");
pre.appendChild(code);
code.onclick = function() {
highlightNew(code);
window.location.hash = (i + 1).toString();
// highlightNew(code);
}
}

File diff suppressed because one or more lines are too long