feat: dynamic highlight.js language import #952
No reviewers
Labels
No Label
area/internal-code
changes requested
confirmed
dependencies
duplicate
good first issue
help wanted
hosting
invalid
kind/bug
kind/feature
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/frontend#952
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "dpschen/frontend:feature/feat-dynamic-hightlighjs-lang-import"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Looks fine to me, any reason this is still wip?
WIP: feat: dynamic highlight.js language importto feat: dynamic highlight.js language importIf it works its fine :)
Sadly, it looks like this does not work like it should. My guess is that marked does not like using async functions for options.
@konrad: It should support it: https://marked.js.org/using_advanced#highlight
But I guess something else doesn't work then =)
Will check.
d9c5cb4b83
to41c710a9ca
@ -48,3 +48,2 @@
import DOMPurify from 'dompurify'
import hljs from 'highlight.js/lib/common'
const hljsImport = () => import('highlight.js/lib/core').then(({hljs}) => hljs)
I changed this line. Maybe it works now =)
Resolving this comment since it seams that this wasn't the issue.
Looks like it still has issues:
That sucks: https://github.com/vitejs/vite/issues/1903
Looks like vite doesn't support dynamic importing of dependency modules.
I was so sure that this would work that I didn't even consider this at first :/
I then manually imported everything, but got another error by marked…
Closing, since we want to replace the editor either way.