chore: adding extra variables to the inline query too

This commit is contained in:
Kacper Kula 2025-03-06 10:07:40 +00:00
parent 81d99d7813
commit 8cb185b40d

View file

@ -55,9 +55,18 @@ export class InlineProcessor extends MarkdownRenderChild {
}
const fileCache = this.app.metadataCache.getFileCache(file);
// TODO: unify this between codeblock and inline handlers
const variables = {
...fileCache?.frontmatter ?? {},
path: file.path,
fileName: file.name,
extension: file.extension,
}
const { data, columns } = await this.db.select(
transformedQuery.sql,
fileCache?.frontmatter ?? {}
transformedQuery.sql,
variables
);
this.el.empty()