From e33885847e7fab333696f4bcf065c6677beca76c Mon Sep 17 00:00:00 2001 From: Nick the Sick Date: Fri, 1 Nov 2024 16:59:55 +0100 Subject: [PATCH] chore: just add the options directly --- .../src/code-block-lowlight.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/extension-code-block-lowlight/src/code-block-lowlight.ts b/packages/extension-code-block-lowlight/src/code-block-lowlight.ts index c52fe3e14..8bace6df9 100644 --- a/packages/extension-code-block-lowlight/src/code-block-lowlight.ts +++ b/packages/extension-code-block-lowlight/src/code-block-lowlight.ts @@ -16,9 +16,13 @@ export interface CodeBlockLowlightOptions extends CodeBlockOptions { export const CodeBlockLowlight = CodeBlock.extend({ addOptions() { return { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - ...this.parent!(), + ...this.parent?.(), lowlight: {}, + languageClassPrefix: 'language-', + exitOnTripleEnter: true, + exitOnArrowDown: true, + defaultLanguage: null, + HTMLAttributes: {}, } },