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

Function getChunkOptions

src/rmarkdown/chunks.ts:37–43  ·  view source on GitHub ↗
(text: string, isRDoc: boolean = false)

Source from the content-addressed store, hash-verified

35}
36
37function getChunkOptions(text: string, isRDoc: boolean = false) {
38 if (isRDoc) {
39 return text.replace(/^#+\s*%%/g, '');
40 } else {
41 return text.replace(/^\s*```+\s*\{\w+\s*,?\s*(.*)\s*\}\s*$/g, '$1');
42 }
43}
44
45function getChunkEval(chunkOptions: string) {
46 return (!chunkOptions.match(/eval\s*=\s*(F|FALSE)/g));

Callers 1

getChunksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected