Skip to content

Commit d94ea88

Browse files
committed
rename fuel() to vest(); although fuel() is a nice name, unfortunately it looks too similar to fuse() and users may accidentally call fuel() when they meant fuse() since the autocomplete will show fuel() before fuse()
1 parent 16afffa commit d94ea88

6 files changed

Lines changed: 16 additions & 16 deletions

File tree

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ S3method(record_print,tbl_df)
88
export(crack)
99
export(engines)
1010
export(fiss)
11-
export(fuel)
1211
export(fuse)
1312
export(fuse_book)
1413
export(fuse_env)
@@ -26,6 +25,7 @@ export(reactor)
2625
export(roam)
2726
export(sieve)
2827
export(timing_data)
28+
export(vest)
2929
import(utils)
3030
importFrom(xfun,Rscript_call)
3131
importFrom(xfun,alnum_id)

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
- Added support for the chunk option `fig.dim`, which is a shortcut for `fig.width` and `fig.height`.
2020

21-
- Added a new function `fuel()` as another way to add CSS/JS assets to HTML output.
21+
- Added a new function `vest()` as another way to add CSS/JS assets to HTML output.
2222

2323
- Provided templates and a Github action `yihui/litedown/site` to build package websites. See https://yihui.org/litedown/#sec:pkg-site for details.
2424

R/package.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ pkg_desc = function(name = detect_pkg()) {
153153
), '\n</tbody></table>'
154154
)
155155

156-
new_asis(c(res, fuel(css = '@manual')))
156+
new_asis(c(res, vest(css = '@manual')))
157157
}
158158

159159
# format authors, adding URL and ORCID links as appropriate
@@ -376,7 +376,7 @@ pkg_manual = function(
376376
res = gsub('<code class="language-R"', '<code class="language-r"', res, fixed = TRUE)
377377
res = gsub('&#8288;', '', res, fixed = TRUE)
378378
res = gsub('<table>', '<table class="table-full">', res, fixed = TRUE)
379-
new_asis(c(toc, res, fuel(css = '@manual')))
379+
new_asis(c(toc, res, vest(css = '@manual')))
380380
}
381381

382382
run_examples = function(html, config, path) {

R/utils.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@ restore_html = function(x) {
217217
#' @examples
218218
#' litedown:::assets[, -1]
219219
#' # add features
220-
#' litedown::fuel(c('copy-button', 'tabsets'))
220+
#' litedown::vest(c('copy-button', 'tabsets'))
221221
#' # add css/js directly
222-
#' litedown::fuel(css = '@tabsets', js = c('@tabsets', '@fold-details'))
223-
fuel = function(feature = NULL, css = NULL, js = NULL) {
222+
#' litedown::vest(css = '@tabsets', js = c('@tabsets', '@fold-details'))
223+
vest = function(feature = NULL, css = NULL, js = NULL) {
224224
if (length(feature)) {
225225
a = assets[feature, , drop = FALSE]
226226
css = c(a[, 'css'], css); js = c(a[, 'js'], js)

docs/05-assets.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@ a
6565

6666
If the source document is R Markdown instead of Markdown, an alternative way (in
6767
addition to configuring YAML metadata) to add assets is to call the function
68-
`litedown::fuel()` in a code chunk. You can either pass vectors of `css` / `js`
68+
`litedown::vest()` in a code chunk. You can either pass vectors of `css` / `js`
6969
asset names to the `css` / `js` arguments, or the `feature` names in @tab:assets
7070
to the `feature` argument, e.g.,
7171

7272
```` md
7373
```{r, echo = FALSE}
7474
# add assets by feature
75-
litedown::fuel(feature = c('callout', 'copy-button'))
75+
litedown::vest(feature = c('callout', 'copy-button'))
7676
# or add css/js directly
77-
litedown::fuel(css = c('@callout', '@book'), js = '@callout')
77+
litedown::vest(css = c('@callout', '@book'), js = '@callout')
7878
```
7979
````
8080

81-
You can call `fuel()` multiple times in a document to keep adding assets.
81+
You can call `vest()` multiple times in a document to keep adding assets.
8282

8383
## The default CSS {#sec:default}
8484

man/fuel.Rd renamed to man/vest.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)