Skip to content

Commit 36614d4

Browse files
cdervyihui
andauthored
don't fallback to parse #| comments in Quarto when the comment character for the language is not # (#2225)
Co-authored-by: Yihui Xie <xie@yihui.name>
1 parent 23ffaab commit 36614d4

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: knitr
22
Type: Package
33
Title: A General-Purpose Package for Dynamic Report Generation in R
4-
Version: 1.50.1
4+
Version: 1.50.2
55
Authors@R: c(
66
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666", URL = "https://yihui.org")),
77
person("Abhraneel", "Sarma", role = "ctb"),
@@ -120,7 +120,7 @@ Imports:
120120
highr (>= 0.11),
121121
methods,
122122
tools,
123-
xfun (>= 0.51),
123+
xfun (>= 0.52),
124124
yaml (>= 2.1.19)
125125
Suggests:
126126
bslib,

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CHANGES IN knitr VERSION 1.51
22

3+
- For Quarto, chunk options written in pipe comments must use the comment character of the chunk's language (#2225). Previously, comments written in `#|` will be parsed even if `#` is not the comment character of the chunk.
4+
35
- `hook_optipng()` now uses the `-quiet` argument of `optipng` to suppress the messages by default.
46

57
# CHANGES IN knitr VERSION 1.50

R/parser.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ partition_chunk = function(engine, code) {
205205
opts = options(xfun.handle_error.loc_fun = get_loc)
206206
on.exit(options(opts))
207207
# the code has been moved to the xfun package
208-
xfun::divide_chunk(engine, code)
208+
xfun::divide_chunk(engine, code, strict = is_quarto())
209209
}
210210

211211
print_block = function(x) {

0 commit comments

Comments
 (0)