mirror of
https://github.com/h-sphere/sql-seal.git
synced 2026-07-22 10:10:28 +00:00
Merge pull request #140 from satkowski/renderContext-update
Fix: added a new property to the render context: the file path the call originates from
This commit is contained in:
commit
85bb0e0afb
3 changed files with 5 additions and 3 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ export interface DataFormat {
|
|||
}
|
||||
|
||||
export interface RendererContext {
|
||||
cellParser: ModernCellParser
|
||||
cellParser: ModernCellParser,
|
||||
sourcePath: string
|
||||
}
|
||||
|
||||
export interface RenderReturn {
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ export class CSVView extends TextFileView {
|
|||
})
|
||||
menu.showAtMouseEvent(e.event as any)
|
||||
}
|
||||
}, gridEl, { cellParser: this.cellParser })
|
||||
}, gridEl, { cellParser: this.cellParser, sourcePath: this.file?.path || '' })
|
||||
|
||||
this.api = api;
|
||||
this.loadDataIntoGrid()
|
||||
|
|
|
|||
Loading…
Reference in a new issue