added a new property to the render context: the file path the call originates from

This commit is contained in:
Marc Satkowski 2025-04-05 22:46:46 +02:00
parent 4f9d04200e
commit 30ec0b5cdd
2 changed files with 4 additions and 2 deletions

View file

@ -73,7 +73,8 @@ export class CodeblockProcessor extends MarkdownRenderChild {
.prepareRender(
results.renderer.type.toLowerCase(), results.renderer.options
)(rendererEl, {
cellParser: this.plugin.cellParser
cellParser: this.plugin.cellParser,
sourcePath: this.ctx.sourcePath
})
// FIXME: probably should save the one before transform and perform transform every time we execute it.

View file

@ -7,7 +7,8 @@ export interface DataFormat {
}
export interface RendererContext {
cellParser: ModernCellParser
cellParser: ModernCellParser,
sourcePath: string
}
export interface RenderReturn {