File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 88
99- Correct handling of ` knitr::include_graphics() ` within inline expressions.
1010
11+ # RMarkdown
12+
13+ - improve error message for HTML being emitted in non-HTMl formats (#1745 )
14+
1115## Pandoc
1216
1317- Update to Pandoc 2.19
Original file line number Diff line number Diff line change @@ -116,6 +116,8 @@ export const knitrEngine: ExecutionEngine = {
116116 ) ;
117117 }
118118
119+ output = filterAlwaysAllowHtml ( output ) ;
120+
119121 return output ;
120122 } ,
121123 ) ;
@@ -283,3 +285,16 @@ async function printCallRDiagnostics() {
283285 info ( "" ) ;
284286 }
285287}
288+
289+ function filterAlwaysAllowHtml ( s : string ) : string {
290+ if (
291+ s . indexOf (
292+ "Functions that produce HTML output found in document targeting" ,
293+ ) !== - 1
294+ ) {
295+ s = s
296+ . replace ( "your rmarkdown file" , "your quarto file" )
297+ . replace ( "always_allow_html: true" , "prefer-html: true" ) ;
298+ }
299+ return s ;
300+ }
You can’t perform that action at this time.
0 commit comments