MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / callback

Method callback

src/rmarkdown/knit.ts:54–68  ·  view source on GitHub ↗
(dat: string)

Source from the content-addressed store, hash-verified

52 };
53
54 const callback = (dat: string) => {
55 const outputUrl = re.exec(dat)?.[0]?.replace(re, '$1');
56 if (!outputUrl) {
57 return false;
58 }
59 if (openOutfile) {
60 const outFile = vscode.Uri.file(outputUrl);
61 if (fs.existsSync(outFile.fsPath)) {
62 void vscode.commands.executeCommand('vscode.open', outFile);
63 } else {
64 void vscode.window.showWarningMessage(`Could not find the output file at path: "${outFile.fsPath}"`);
65 }
66 }
67 return true;
68 };
69
70 if (util.config().get<boolean>('rmarkdown.knit.focusOutputChannel')) {
71 this.rMarkdownOutput.show(true);

Callers 1

knitDocumentFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected