From e595bbbea88b9ab137453ede200a66772180333b Mon Sep 17 00:00:00 2001 From: Christian Lawson-Perfect Date: Wed, 12 Feb 2025 10:45:39 +0000 Subject: [PATCH] correctly apply syntax highlighting --- Makefile | 2 +- dist/code-editor.mjs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 66ada12..9abb34b 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PROD_DIR=/srv/think.somethingorotherwhatever.com/thinks/static/thinks ELMS=$(wildcard src/*.elm) -deploy: $(PROD_DIR)/think-editor.js $(PROD_DIR)/load-think-editor.mjs $(PROD_DIR)/think-editor.css +deploy: $(PROD_DIR)/think-editor.js $(PROD_DIR)/load-think-editor.mjs $(PROD_DIR)/think-editor.css $(PROD_DIR)/code-editor.mjs build: dist/think-editor.js diff --git a/dist/code-editor.mjs b/dist/code-editor.mjs index 56c21e7..715e75f 100644 --- a/dist/code-editor.mjs +++ b/dist/code-editor.mjs @@ -37171,7 +37171,6 @@ class CodeEditorElement extends HTMLElement { constructor() { super(); - this.language = this.getAttribute('language') || ''; this.attachShadow({mode: 'open'}); } @@ -37182,9 +37181,10 @@ class CodeEditorElement extends HTMLElement { init_editor() { const code = this.textContent; const code_tag = this.shadowRoot; - + const language = this.getAttribute('language') || ''; + this.codeMirror = codemirror_editor( - this.language, + language, { doc: code, parent: code_tag,