Closed cderv closed 1 month ago
A quick bisect shows that 5435c52469af3781541ef0708bb9fcd7dced3d45 was the commit that broke
This is when we moved to xfun::fenced_block()
. When there is only one class (the language), we now have a space and the regex does not handle it
Note that using several classes or attributes works as we create the other syntax
> xfun::raw_string(knitr::knit(text = c("```{r, collapse=TRUE, class.source='b'}\n1 + 1\n1:1\n```")))
```{.r .b}
1 + 1
## [1] 2
1:1
## [1] 1
xfun::raw_string(knitr::knit(text = c("
{r, collapse=TRUE, attr.source='b=true'}\n1 + 1\n1:1\n
")))
1 + 1
## [1] 2
1:1
## [1] 1
It seems we missed a breakage in 1.46 release
With knitr 1.46