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:
@@ -23,7 +23,11 @@
|
|||||||
|
|
||||||
title.innerText = data.name;
|
title.innerText = data.name;
|
||||||
|
|
||||||
|
if (data.name.endsWith(".txt")) {
|
||||||
|
body.innerText = data.content;
|
||||||
|
} else {
|
||||||
body.innerHTML = hljs.highlightAuto(data.content).value;
|
body.innerHTML = hljs.highlightAuto(data.content).value;
|
||||||
|
}
|
||||||
|
|
||||||
addEventListener("keydown", event => {
|
addEventListener("keydown", event => {
|
||||||
if ((event.ctrlKey || event.metaKey) && event.key === "S") {
|
if ((event.ctrlKey || event.metaKey) && event.key === "S") {
|
||||||
|
|||||||
Reference in New Issue
Block a user