(text: string, isRDoc: boolean = false)
| 35 | } |
| 36 | |
| 37 | function 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 | |
| 45 | function getChunkEval(chunkOptions: string) { |
| 46 | return (!chunkOptions.match(/eval\s*=\s*(F|FALSE)/g)); |