1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-09 17:29:54 +00:00

fixes for reasoning display & storing data

This commit is contained in:
Laura
2025-08-09 22:58:17 +02:00
parent b258085d5e
commit a95d22b500
6 changed files with 40 additions and 15 deletions

View File

@@ -18,14 +18,15 @@
let code;
if (lang && hljs.getLanguage(lang)) {
code = hljs.highlight(text, {
code = hljs.highlight(text.trim(), {
language: lang,
});
} else {
code = hljs.highlightAuto(text);
code = hljs.highlightAuto(text.trim());
}
token.escaped = true;
token.lang = code.language || "plaintext";
token.text = code.value;
},