[RMD]: Support Child Options#2548
Conversation
| private mergedCode?: string; | ||
|
|
||
| private readonly wrapped: FlowrFileProvider<string>; | ||
| private readonly context: FlowrAnalyzerContext; |
There was a problem hiding this comment.
eigentlich war mal die idee, dass files, in mehreren contexten existieren und damit shared ein können aber dann brechen wir das auf :)
There was a problem hiding this comment.
Oki, dann passt das so?
Ich könnte die logik fürs nachladen von Blöcken ja auch in das Plugin und nicht in das File verschieben.
Dann braucht das File den kontext nicht.
There was a problem hiding this comment.
hmm, also unter dem gesichtspunkt wäre es schön wenn das nachladen zwar im file passiert, aber man den context als paramteter übergibt
| request: 'file', | ||
| content: childPath | ||
| }); | ||
| const rmdChild = FlowrRMarkdownFile.from(new FlowrInlineTextFile(childPath, childFile.r.content), this.context); |
There was a problem hiding this comment.
sicher dass das noch nötig is? :D
There was a problem hiding this comment.
Habs gerade ausprobiert. Wenn ich direkt childFile.r.content aufrufe bekomnme ich das file als string, mit Markdown und Code Blöcken. Ich brauche aber nur den code extrahiert aus den Blöcken.
There was a problem hiding this comment.
oh ok, aber dann fände ich es trotzdem smoother, wenn du ein ctx.files.get(<path>) hinzufügst, weil so wire s ja auch zwei mal geparsed!
| * Restores an Rmd file from code blocks, filling non-code lines with empty lines | ||
| */ | ||
| export function restoreBlocksWithoutMd(blocks: CodeBlockEx[], totalLines: number): string { | ||
| export function restoreBlocksWithoutMd(blocks: CodeBlock[], totalLines: number): string { |
Closes #2539