Move contents of heynote-electron subdirectory into git repo root

This commit is contained in:
Jonatan Heyman
2023-01-13 13:21:34 +01:00
parent f759856c45
commit 9fb543fed3
47 changed files with 3 additions and 3 deletions

View File

@ -0,0 +1,19 @@
importScripts("highlight.min.js")
const HIGHLIGHTJS_LANGUAGES = ["json", "python", "javascript", "html", "sql", "java", "plaintext"]
onmessage = (event) => {
//console.log("worker received message:", event.data)
//importScripts("../../lib/highlight.min.js")
const result = self.hljs.highlightAuto(event.data.content, HIGHLIGHTJS_LANGUAGES);
postMessage({
highlightjs: {
language: result.language,
relevance: result.relevance,
illegal: result.illegal,
},
content: event.data.content,
idx: event.data.idx,
})
}