Fix so that language detection web worker works both in development and release build

This commit is contained in:
Jonatan Heyman 2023-01-13 01:43:20 +01:00
parent 6ff9d2ca4a
commit 77d457bdee
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
importScripts("/highlight.min.js")
importScripts("highlight.min.js")
const HIGHLIGHTJS_LANGUAGES = ["json", "python", "javascript", "html", "sql", "java", "plaintext"]

View File

@ -11,7 +11,7 @@ export function languageDetection(getView) {
const previousBlockContent = []
let idleCallbackId = null
const detectionWorker = new Worker('/src/editor/language-detection/worker.js');
const detectionWorker = new Worker('langdetect-worker.js?worker');
detectionWorker.onmessage = (event) => {
//console.log("event:", event.data)
if (!event.data.highlightjs.language) {