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

Function getChunkLanguage

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

Source from the content-addressed store, hash-verified

28}
29
30function getChunkLanguage(text: string, isRDoc: boolean = false) {
31 if (isRDoc) {
32 return 'r';
33 }
34 return text.replace(/^\s*```+\s*\{(\w+)\s*.*\}\s*$/g, '$1').toLowerCase();
35}
36
37function getChunkOptions(text: string, isRDoc: boolean = false) {
38 if (isRDoc) {

Callers 2

getChunksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected