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

Function isChunkEndLine

src/rmarkdown/chunks.ts:21–28  ·  view source on GitHub ↗
(text: string, isRDoc: boolean)

Source from the content-addressed store, hash-verified

19}
20
21function isChunkEndLine(text: string, isRDoc: boolean) {
22 if (isRDoc) {
23 const isSectionHeader = text.match(/^#+\s*.*[-#+=*]{4,}/g);
24 return (isRChunkLine(text) || isSectionHeader);
25 } else {
26 return (!!text.match(/^\s*```+\s*$/g));
27 }
28}
29
30function getChunkLanguage(text: string, isRDoc: boolean = false) {
31 if (isRDoc) {

Callers 1

getChunksFunction · 0.85

Calls 1

isRChunkLineFunction · 0.85

Tested by

no test coverage detected