mirror of
https://github.com/heyman/heynote.git
synced 2024-11-25 09:23:17 +01:00
Fix so that language detection web worker works both in development and release build
This commit is contained in:
parent
6ff9d2ca4a
commit
77d457bdee
@ -1,4 +1,4 @@
|
||||
importScripts("/highlight.min.js")
|
||||
importScripts("highlight.min.js")
|
||||
|
||||
const HIGHLIGHTJS_LANGUAGES = ["json", "python", "javascript", "html", "sql", "java", "plaintext"]
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user