|
1 |
| -# epoxy (development version) |
| 1 | +# epoxy 1.0.0 |
2 | 2 |
|
3 |
| -* `epoxy()` now adds a `.data` pronoun that allows you to refer to the list or |
4 |
| - data frame passed into either the `.data` argument of `epoxy()` or the `data` |
5 |
| - or `.data` chunk options. (#100) |
| 3 | +## Breaking Changes |
| 4 | + |
| 5 | +* **Breaking change:** `epoxy_latex()` and the `epoxy_latex` chunk engine it |
| 6 | + powers now use `<<` and `>>` to delimit inline expressions. Where you |
| 7 | + previously may have used `<expr>`, please now use `<<expr>>`. This breaking |
| 8 | + change was necessary to allow the `expr` to include common R operators like |
| 9 | + `<` and `>`. (#107) |
| 10 | + |
| 11 | +* **Breaking change:** the `whisker` engine is now powered by |
| 12 | + `epoxy_mustache()`, resulting in a few small changes. In particular, if you |
| 13 | + previously used a list for the `.data` chunk option in a `whisker` chunk, and |
| 14 | + relied on the `whisker` engine's special treatment of lists to iterate over |
| 15 | + their items, you'll need to specifically opt into this behavior by adding a |
| 16 | + `.vectorized = TRUE` chunk option. |
| 17 | + |
| 18 | + This chunk engine still vectorizes over rows in a data frame by default, where |
| 19 | + it's much more likely to be the behavior you want, but bare lists require |
| 20 | + specifically opting in. (#103) |
6 | 21 |
|
7 | 22 | * `.data` is now the preferred chunk option for passing data frames or lists of
|
8 |
| - data to epoxy chunks. It works in `whisker` and `epoxy` chunks, and is more |
9 |
| - consistent with the `.data` argument of `glue()` and `epoxy()`. (#102) |
| 23 | + data to epoxy chunks, where previously `data` was used in some places. It |
| 24 | + works in `whisker` and `epoxy` chunks, and is more consistent with the `.data` |
| 25 | + argument of `glue()` and `epoxy()`. (#102) |
| 26 | + |
| 27 | +## New Features |
10 | 28 |
|
11 | 29 | * New `epoxy_mustache()` provides an epoxy-style interface to the
|
12 | 30 | [mustache](https://mustache.github.io/) templating language, using the
|
|
19 | 37 | `epoxy()`, `epoxy_html()` or other epoxy-provided knitr chunk or file as a
|
20 | 38 | template. `epoxy_use_chunk()` lets you re-use a template chunk with new data,
|
21 | 39 | and `epoxy_use_file()` lets you repeatedly use a template stored in a file.
|
22 |
| - Both function also re-use the options from the template chunk or the options |
| 40 | + Both functions also re-use the options from the template chunk or the options |
23 | 41 | set in the YAML from matter of the template file. See `?epoxy_use` for more
|
24 | 42 | details about how options for both functions are determined. (#106, #116)
|
25 | 43 |
|
26 |
| -* **Breaking change:** now that the `whisker` engine is powered by |
27 |
| - `epoxy_mustache()`, there have been a few small changes. In particular, if you |
28 |
| - previously used a list for the `.data` chunk option in a `whisker` chunk, and |
29 |
| - relied on the `whisker` engine's special treatment of lists to iterate over |
30 |
| - their items, you'll need to specifically opt into this behavior by adding a |
31 |
| - `.vectorized = TRUE` chunk option. |
| 44 | +## Improvements and bug fixes |
32 | 45 |
|
33 |
| - This chunk engine still vectorizes over rows in a data frame by default, where |
34 |
| - it's much more likely to be the behavior you want, but bare lists require |
35 |
| - specifically opting in. (#103) |
| 46 | +* `epoxy()` now adds a `.data` pronoun that allows you to refer to the list or |
| 47 | + data frame passed into either the `.data` argument of `epoxy()` or the `data` |
| 48 | + or `.data` chunk options. (#100) |
36 | 49 |
|
37 |
| -* **Breaking change:** `epoxy_latex()` and the `epoxy_latex` chunk engine it |
38 |
| - powers now use `<<` and `>>` to delimit inline expressions. Where you |
39 |
| - previously may have used `<expr>`, please now use `<<expr>>`. This breaking |
40 |
| - change was necessary to allow the `expr` to include common R operators like |
41 |
| - `<` and `>`. (#107) |
| 50 | +* `epoxy_html()` now supports inline transformations prefixed with `@` instead |
| 51 | + of `.`, e.g. `@strong` instead of `.strong`. Previously, you would have to |
| 52 | + place the inline transformer in a nested `{{ }}` block, e.g. |
| 53 | + `{{ {{ .strong expr }} }}`, but now you only need `{{@strong expr}}`. To combine the HTML transformer (`epoxy_transform_html()`) with the inline |
| 54 | + transformer, you still need to nest: `{{.text-muted {{@strong expr}}}}` |
| 55 | + creates `<span class="text-muted"><strong>{expr}</strong></span>`. (#120) |
| 56 | + |
| 57 | +* `epoxy()`, and by extension the LaTex and HTML counterparts, and all `epoxy_*` |
| 58 | + knitr engines gain a `.collapse` argument to determine how a vector of |
| 59 | + epoxy-transformed templates should be collapsed. The default is `NULL`, which |
| 60 | + means that the output is returned as a vector. This argument is also useful in |
| 61 | + `epoxy_use_chunk()` and for knitr chunks being used as a vectorized template. |
| 62 | + (#115) |
42 | 63 |
|
43 | 64 | * Aded `.sentence` (alias `.sc`) to the list of inline transformers provided by
|
44 | 65 | `epoxy_transform_inline()`. This transformer will capitalize the first letter
|
|
49 | 70 | `as.character()` before applying `tools::toTitleCase()`, since `toTitleCase()`
|
50 | 71 | will throw an error for non-character inputs. (#112)
|
51 | 72 |
|
52 |
| -* `epoxy()`, and by extension the LaTex and HTML counterparts, and all `epoxy_*` |
53 |
| - knitr engines gain a `.collapse` argument to determine how a vector of |
54 |
| - epoxy-transformed templates should be collapsed. The default is `NULL`, which |
55 |
| - means that the output is returned as a vector. This argument is also useful in |
56 |
| - `epoxy_use_chunk()` and for knitr chunks being used as a vectorized template. |
57 |
| - (#115) |
58 |
| - |
59 |
| -* Fixed an issue with `epoxy_inline_transform()` when used with custom |
60 |
| - delimiters (#116). |
61 |
| - |
62 | 73 | * `epoxy()`, `epoxy_html()`, `epoxy_latex()` and `epoxy_mustache()` (and their
|
63 | 74 | related knitr engines) will all collect remote `tbl_sql` tables before
|
64 | 75 | evaluation. This makes it much easier to pass data from a remote database
|
65 | 76 | using `{dplyr}` and `{dbplyr}`. (#117)
|
66 | 77 |
|
67 |
| -* `epoxy_html()` now supports inline transformations prefixed with `@` instead |
68 |
| - of `.`, e.g. `@strong` instead of `.strong`. Previously, you would have to |
69 |
| - place the inline transformer in a nested `{{ }}` block, e.g. |
70 |
| - `{{ {{ .strong expr }} }}`, but now you only need `{{@strong expr}}`. To combine the HTML transformer (`epoxy_transform_html()`) with the inline |
71 |
| - transformer, you still need to nest: `{{.text-muted {{@strong expr}}}}` |
72 |
| - creates `<span class="text-muted"><strong>{expr}</strong></span>`. (#120) |
| 78 | +* Fixed an issue with `epoxy_inline_transform()` when used with custom |
| 79 | + delimiters (#116). |
73 | 80 |
|
74 | 81 | # epoxy 0.1.1
|
75 | 82 |
|
@@ -211,7 +218,7 @@ versions that were available on GitHub prior to the CRAN release.
|
211 | 218 | (#37).
|
212 | 219 |
|
213 | 220 | * `epoxy_transform_collapse()` now uses the
|
214 |
| - [and package](https://and.rossellhayes.com/), which provides language-aware |
| 221 | + [and package](https://github.com/rossellhayes/and/), which provides language-aware |
215 | 222 | conjoining of strings. As a result, the `sep_and` and `sep_or` arguments of
|
216 | 223 | `epoxy_transform_collapse()` are deprecated and are silently ignored if
|
217 | 224 | provided (#45).
|
|
0 commit comments