mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-21 01:13:08 -07:00
Update source
This commit is contained in:
parent
d5e09f5b46
commit
3ceeb5d5db
2 changed files with 5 additions and 4 deletions
|
@ -283,15 +283,16 @@ haste.prototype.lockDocument = function() {
|
||||||
}
|
}
|
||||||
else if (ret) {
|
else if (ret) {
|
||||||
//_this.$code.html(htmlEscape(ret.value));
|
//_this.$code.html(htmlEscape(ret.value));
|
||||||
var lines = ret.value.split(/\r\n|\r|\n/);
|
const lines = ret.value.split(/\r\n|\r|\n/);
|
||||||
for (var i = 0; i < lines.length; i++) {
|
for (let i = 0; i < lines.length; i++) {
|
||||||
let code = document.createElement('code');
|
let code = document.createElement('code');
|
||||||
code.innerHTML = lines[i];
|
code.innerHTML = lines[i];
|
||||||
let pre = document.getElementById("box");
|
let pre = document.getElementById("box");
|
||||||
pre.appendChild(code);
|
pre.appendChild(code);
|
||||||
|
|
||||||
code.onclick = function() {
|
code.onclick = function() {
|
||||||
highlightNew(code);
|
window.location.hash = (i + 1).toString();
|
||||||
|
// highlightNew(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
static/application.min.js
vendored
2
static/application.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue