1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-12-02 20:22:52 +00:00

dont highlight if named .txt

This commit is contained in:
Laura
2025-11-04 00:24:39 +01:00
parent 9f983f3034
commit ac389ddf94

View File

@@ -23,7 +23,11 @@
title.innerText = data.name;
if (data.name.endsWith(".txt")) {
body.innerText = data.content;
} else {
body.innerHTML = hljs.highlightAuto(data.content).value;
}
addEventListener("keydown", event => {
if ((event.ctrlKey || event.metaKey) && event.key === "S") {