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;