aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2019-04-13 20:06:43 +0200
committerMarvin Borner2019-04-13 20:06:43 +0200
commit7117f01a3e64726f4e069df21634647613325d4a (patch)
tree42c863b9755b982ff98234252851606abb914a8b
parent9e91d7e8cd3a3cdfee7f4d10347f48980eeaae93 (diff)
Fixed html rendering at line number view
-rw-r--r--src/main/resources/js/fileview.js4
-rw-r--r--src/main/resources/views/fileview.rocker.html1
2 files changed, 2 insertions, 3 deletions
diff --git a/src/main/resources/js/fileview.js b/src/main/resources/js/fileview.js
index 039d618..c6b10f2 100644
--- a/src/main/resources/js/fileview.js
+++ b/src/main/resources/js/fileview.js
@@ -40,13 +40,13 @@ code.addEventListener("change", () => {
content.classList.remove("prettyprinted");
content.innerHTML = "";
content.classList.add("linenums");
- content.innerHTML = originalContent;
+ content.innerText = originalContent;
PR.prettyPrint();
} else {
content.classList.remove("prettyprinted");
content.innerHTML = "";
content.classList.remove("linenums");
- content.innerHTML = originalContent;
+ content.innerText = originalContent;
PR.prettyPrint();
}
});
diff --git a/src/main/resources/views/fileview.rocker.html b/src/main/resources/views/fileview.rocker.html
index 087aba7..bef1ad0 100644
--- a/src/main/resources/views/fileview.rocker.html
+++ b/src/main/resources/views/fileview.rocker.html
@@ -14,7 +14,6 @@
@layout.template("File " + filename, css, js) -> {
<button class="switch" id="raw">Show raw</button>
<span class="settings" id="settings">
- <!-- TODO: HTML gets executed on linecount option click - why? -->
<label for="code">Linecount</label><input id="code" type="checkbox">
<label for="dark">Dark mode</label><input id="dark" type="checkbox">
</span>