From 9cd996f65c4e9cd9515600ac979a014741642823 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Sat, 25 May 2024 18:33:44 +0200 Subject: [PATCH] ensure it re-highlights code --- frontend/app.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index 03044e9..e175998 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -1,9 +1,10 @@ import {CodeJar} from "./codejar.js" -const highlight = editor => { - editor.textContent = editor.textContent - hljs.highlightElement(editor) -} +function highlight(editor) { + editor.textContent = editor.textContent; + editor.removeAttribute("data-highlighted"); + hljs.highlightElement(editor); +} function base64ToBytes(base64) { const binString = atob(base64);