Skip to content

Commit

Permalink
too many ways to do the same thing... drop support for #- in spin()
Browse files Browse the repository at this point in the history
perhaps should drop `@knitr`, too...
  • Loading branch information
yihui committed Mar 28, 2024
1 parent f5f2e7b commit 76142a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: knitr
Type: Package
Title: A General-Purpose Package for Dynamic Report Generation in R
Version: 1.45.15
Version: 1.45.16
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
person("Abhraneel", "Sarma", role = "ctb"),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

- The function `imgur_upload()` has been moved to (and enhanced in) the **xfun** package as `xfun::upload_imgur()` so it is no longer tied to **knitr** and can be reused by other pakages. Now `knitr::imgur_upload()` is only a wrapper function of `xfun::upload_imgur()`. You are recommended to use the latter (#2325).

- `spin()` dropped support for `#-` as the chunk delimiter token. Please use `#+` or `# %%` or `#|` instead.

# CHANGES IN knitr VERSION 1.45

## NEW FEATURES
Expand Down
2 changes: 1 addition & 1 deletion R/spin.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ spin = function(
block = strip_white(block) # rm white lines in beginning and end
if (!length(block)) next

rc = '^(#|--)+(\\+|-| %%| ----+| @knitr)(.*?)\\s*-*\\s*$'
rc = '^(#|--)+(\\+| %%| ----+| @knitr)(.*?)\\s*-*\\s*$'
j1 = grep(rc, block)
# pipe comments (#|) should start a code chunk if they are not preceded by
# chunk opening tokens
Expand Down

0 comments on commit 76142a2

Please sign in to comment.