Skip to content

[RMD]: Support Child Options#2548

Open
gigalasr wants to merge 2 commits into
mainfrom
2539-rmd-child-opt
Open

[RMD]: Support Child Options#2548
gigalasr wants to merge 2 commits into
mainfrom
2539-rmd-child-opt

Conversation

@gigalasr

Copy link
Copy Markdown
Collaborator

Closes #2539

private mergedCode?: string;

private readonly wrapped: FlowrFileProvider<string>;
private readonly context: FlowrAnalyzerContext;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eigentlich war mal die idee, dass files, in mehreren contexten existieren und damit shared ein können aber dann brechen wir das auf :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sicher dass das noch nötig is? :D

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readonly marker?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RMD]: Support for child option

2 participants