File tree Expand file tree Collapse file tree 5 files changed +12
-11
lines changed
Expand file tree Collapse file tree 5 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 1616## Knitr engine
1717
1818- Help rmarkdown find pandoc binary bundled with Quarto if none is found ([ #3688 ] ( https://github.com/quarto-dev/quarto-cli/issues/3688 ) ).
19+ - Do not bind knitr engine when only inline ` r ` expressions are found ([ #3908 ] ( https://github.com/quarto-dev/quarto-cli/issues/3908 ) ).
1920
2021## Code Annotation
2122
Original file line number Diff line number Diff line change @@ -130,8 +130,8 @@ export function markdownExecutionEngine(
130130 }
131131
132132 // if there is no computational engine discovered then bind
133- // to the knitr engine if there are inline r expressions
134- return engineForMarkdownWithNoLanguages ( markdown ) ;
133+ // to the markdown engine;
134+ return markdownEngine ;
135135}
136136
137137/**
@@ -209,14 +209,6 @@ export async function fileExecutionEngineAndTarget(
209209 } ;
210210}
211211
212- function engineForMarkdownWithNoLanguages ( markdown : string ) {
213- if ( markdown . match ( / ` r [ # ] ( [ ^ ` ] + ) \s * ` / ) ) {
214- return knitrEngine ;
215- } else {
216- return markdownEngine ;
217- }
218- }
219-
220212export function engineIgnoreDirs ( ) {
221213 const ignoreDirs : string [ ] = [ "node_modules" ] ;
222214 executionEngines ( ) . forEach ( ( name ) => {
Original file line number Diff line number Diff line change 1- An inline r value ` r 7 * 11 * 13 ` .
1+ An inline r value ` r 7 * 11 * 13 ` .
2+
3+ As of 2023-03-07, we only auto-bind code blocks.
4+
5+ ``` {r}
6+ 3 + 4
7+ ```
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ citation:
2929 collection-title : foo
3030 keyword : ' foo, bar'
3131bibliography : " `r 'references.bib'`"
32+ engine : knitr
3233---
3334
3435## this is a test document
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ citation:
2929 collection-title : foo
3030 keyword : ' foo, bar'
3131bibliography : " `r 'references.bib'`"
32+ engine : knitr
3233---
3334
3435## this is a test document
You can’t perform that action at this time.
0 commit comments