From 2ffbd62e4f846111be69d83251d3682387fab598 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 22 Jan 2024 23:16:59 +0100 Subject: [PATCH] Fix wrong import syntax for mark.js --- client/src/components/content-blocks/ContentComponent.vue | 3 +-- client/src/directives/highlight.ts | 2 +- client/tsconfig.app.json | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/content-blocks/ContentComponent.vue b/client/src/components/content-blocks/ContentComponent.vue index 335eab54..657d0d80 100644 --- a/client/src/components/content-blocks/ContentComponent.vue +++ b/client/src/components/content-blocks/ContentComponent.vue @@ -29,7 +29,7 @@ import { useStore } from 'vuex'; import { constructContentComponentBookmarkMutation } from '@/helpers/update-content-bookmark-mutation'; import { useMutation } from '@vue/apollo-composable'; import { HighlightNode } from '@/__generated__/graphql'; -import * as Mark from 'mark.js'; +import Mark from 'mark.js'; import highlightSidebar from '@/helpers/highlight-sidebar'; export interface Props { @@ -153,7 +153,6 @@ watch( () => filteredHighlights.value.length, () => { for (const paragraph of paragraphs.value) { - console.log(paragraph); const instance = new Mark(paragraph); instance.unmark(); } diff --git a/client/src/directives/highlight.ts b/client/src/directives/highlight.ts index 38c33b8d..1c02f51f 100644 --- a/client/src/directives/highlight.ts +++ b/client/src/directives/highlight.ts @@ -2,7 +2,7 @@ import { DirectiveBinding } from 'vue'; import * as rangy from 'rangy'; import 'rangy/lib/rangy-textrange'; import log from 'loglevel'; -import * as Mark from 'mark.js'; +import Mark from 'mark.js'; import { ContentBlockNode } from '@/__generated__/graphql'; import ContentBlock from '@/components/ContentBlock.vue'; import popover from '@/helpers/popover'; diff --git a/client/tsconfig.app.json b/client/tsconfig.app.json index 44df4e5b..9d918fbe 100644 --- a/client/tsconfig.app.json +++ b/client/tsconfig.app.json @@ -3,6 +3,7 @@ "allowJs": true, "checkJs": false, "resolveJsonModule": true, + "allowSyntheticDefaultImports": true, "lib": ["es2017", "dom"], "target": "es6", "module": "es2022",