From 5b734ff3ebf3f9d90c69a34953792f5ba67e9924 Mon Sep 17 00:00:00 2001 From: Kacper Kula Date: Tue, 6 May 2025 14:41:30 +0100 Subject: [PATCH] fix: fix after migrating to newer package version --- src/codeblockHandler/CodeblockProcessor.ts | 2 +- src/codeblockHandler/inline/InlineProcessor.ts | 2 +- src/main.ts | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/codeblockHandler/CodeblockProcessor.ts b/src/codeblockHandler/CodeblockProcessor.ts index 341b156..8179d10 100644 --- a/src/codeblockHandler/CodeblockProcessor.ts +++ b/src/codeblockHandler/CodeblockProcessor.ts @@ -113,7 +113,7 @@ export class CodeblockProcessor extends MarkdownRenderChild { if (file) { const fileCache = this.app.metadataCache.getFileCache(file) variables = { - ...fileCache?.frontmatter ?? {}, + ...(fileCache?.frontmatter ?? {}), path: file.path, fileName: file.name, basename: file.basename, diff --git a/src/codeblockHandler/inline/InlineProcessor.ts b/src/codeblockHandler/inline/InlineProcessor.ts index 97a5bcf..1cef51f 100644 --- a/src/codeblockHandler/inline/InlineProcessor.ts +++ b/src/codeblockHandler/inline/InlineProcessor.ts @@ -58,7 +58,7 @@ export class InlineProcessor extends MarkdownRenderChild { // TODO: unify this between codeblock and inline handlers const variables = { - ...fileCache?.frontmatter ?? {}, + ...(fileCache?.frontmatter ?? {}), path: file.path, fileName: file.name, basename: file.basename, diff --git a/src/main.ts b/src/main.ts index 20792a6..3718839 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,6 +21,14 @@ import { ModernCellParser } from './cellParser/ModernCellParser'; import { getCellParser } from './cellParser/factory'; import { CellFunction } from './cellParser/CellFunction'; +import { AllCommunityModule, ModuleRegistry, provideGlobalGridOptions } from 'ag-grid-community'; + +// Register all community features +ModuleRegistry.registerModules([AllCommunityModule]); + +// Mark all grids as using legacy themes +provideGlobalGridOptions({ theme: "legacy"}); + export default class SqlSealPlugin extends Plugin { settings: SQLSealSettings; fileSync: SealFileSync;