(text: string, isRDoc: boolean)
| 19 | } |
| 20 | |
| 21 | function 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 | |
| 30 | function getChunkLanguage(text: string, isRDoc: boolean = false) { |
| 31 | if (isRDoc) { |
no test coverage detected