From ad91c14f6762eaaaabf9a001fc42ef1d1ea48f44 Mon Sep 17 00:00:00 2001 From: kellijohnson-NOAA Date: Thu, 21 Oct 2021 08:21:08 -0700 Subject: [PATCH 1/4] fix: use github.io for Mustache in README --- README.rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rmd b/README.rmd index bc8f657..cacd039 100644 --- a/README.rmd +++ b/README.rmd @@ -3,7 +3,7 @@ Whisker ======= -Whisker is a [{{Mustache}}](http://mustache.github.com) implementation in +Whisker is a [{{Mustache}}](https://mustache.github.io/) implementation in [R](http://www.r-project.org/) confirming to the Mustache specification. Mustache is a logicless templating language, meaning that no programming source code can be used in your templates. This may seem very limited, but Mustache is From 45eb723cebc670e1f1b9df81555080fe025a8a03 Mon Sep 17 00:00:00 2001 From: kellijohnson-NOAA Date: Thu, 21 Oct 2021 08:44:10 -0700 Subject: [PATCH 2/4] fix call to install_github with repo argument remotes::install_github no longer uses repo and user Instead, guidance for repo is username/repo[/subdir][@ref|#pull|@*release] and user is deprecated. --- README.rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rmd b/README.rmd index cacd039..5df3679 100644 --- a/README.rmd +++ b/README.rmd @@ -48,7 +48,7 @@ The latest whisker version is not yet available on CRAN, but can be installed fr library(devtools) # dev_mode() -install_github("whisker", "edwindj") +install_github("edwindj/whisker") ``` Usage From 6c65cbb8a71702eaa594d1ecad9acd8d07a636ee Mon Sep 17 00:00:00 2001 From: kellijohnson-NOAA Date: Thu, 21 Oct 2021 08:42:24 -0700 Subject: [PATCH 3/4] designate whisker.render as a function using () and specify double tidyverse style guide suggests using () after all function calls to notify readers that it is a function rather than a variable place double in brackets after example to create consistency with the triple example --- README.rmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rmd b/README.rmd index 5df3679..b2ce02a 100644 --- a/README.rmd +++ b/README.rmd @@ -54,7 +54,7 @@ install_github("edwindj/whisker") Usage ----- -`whisker.render` accepts a `character` template and a list or environment containing data to render: +`whisker.render()` accepts a `character` template and a list or environment containing data to render: ```{r tidy=FALSE} library(whisker) @@ -94,6 +94,6 @@ writeLines(whisker.render(template, data), "./output.html") Note ---- -By default `whisker` applies `html` escaping on the generated text. -To prevent this use "{{{variable}}}" (triple) in stead of "{{variable}}". +By default whisker applies html escaping on the generated text. +To prevent this use "{{{variable}}}" (triple) in stead of "{{variable}}" (double). From eb6e2acca5f395205614472cdd9efc90a799ee78 Mon Sep 17 00:00:00 2001 From: kellijohnson-NOAA Date: Thu, 21 Oct 2021 08:28:31 -0700 Subject: [PATCH 4/4] fix spelling in README, whisker, and pkg separate and in stead --- R/pkg.R | 2 +- R/whisker.R | 4 ++-- README.rmd | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/R/pkg.R b/R/pkg.R index de35a9e..83fa8ff 100644 --- a/R/pkg.R +++ b/R/pkg.R @@ -10,7 +10,7 @@ #' Mustache (and therefore \code{whisker}) takes a simple but different approach to templating compared to #' most templating engines. Most templating libraries for example \code{Sweave} and \code{brew} allow the user #' to mix programming code and text throughout the template. This is powerful, but ties a template directly -#' to a programming language. Furthermore that approach makes it difficult to seperate programming code +#' to a programming language. Furthermore that approach makes it difficult to separate programming code #' from templating code. #' #' Whisker on the other hand, takes a Mustache template and uses the variables of the current environment (or the diff --git a/R/whisker.R b/R/whisker.R index 63d2931..c166030 100644 --- a/R/whisker.R +++ b/R/whisker.R @@ -4,14 +4,14 @@ #' @param data named \code{list} or \code{environment} with variables that will be used during rendering #' @param partials named \code{list} with partial templates, will be used during template construction #' @param debug Used for debugging purposes, likely to disappear -#' @param strict \code{logical} if \code{TRUE} the seperation symbol is a "." otherwise a "$" +#' @param strict \code{logical} if \code{TRUE} the separation symbol is a "." otherwise a "$" #' @return \code{character} with rendered template #' @rdname whisker.render #' @example examples/whisker_render.R #' @export #' @note #' By default whisker applies html escaping on the generated text. -#' To prevent this use \{\{\{variable\}\}\} (triple) in stead of +#' To prevent this use \{\{\{variable\}\}\} (triple) instead of #' \{\{variable\}\}. whisker.render <- function( template , data = parent.frame() diff --git a/README.rmd b/README.rmd index b2ce02a..1d3e2ef 100644 --- a/README.rmd +++ b/README.rmd @@ -16,7 +16,7 @@ Mustache (and therefore whisker) takes a simple, but different, approach to templating compared to most templating engines. Most templating libraries, such as `Sweave`, `knitr` and `brew`, allow the user to mix programming code and text throughout the template. This is powerful, but ties your template directly -to a programming language and makes it difficult to seperate programming code from +to a programming language and makes it difficult to separate programming code from templating code. Whisker, on the other hand, takes a Mustache template and uses the variables of the @@ -30,8 +30,8 @@ How the mustache template are used with whisker can be found in the whisker docu Mustache specification ---------------------- -Whisker conforms to the [Mustache 1.1 specificaton](https://github.com/mustache/spec) except for delimiter switching and -lambdas. We expect that these will be implented shortly. +Whisker conforms to the [Mustache 1.1 specification](https://github.com/mustache/spec) except for delimiter switching and +lambdas. We expect that these will be implemented shortly. Installation ============ @@ -42,7 +42,7 @@ To install whisker use the following statement in your R console install.packages("whisker") ``` -The latest whisker version is not yet available on CRAN, but can be installed from github: +The latest whisker version is not yet available on CRAN, but can be installed from GitHub: ```r library(devtools) @@ -95,5 +95,5 @@ Note ---- By default whisker applies html escaping on the generated text. -To prevent this use "{{{variable}}}" (triple) in stead of "{{variable}}" (double). +To prevent this use "{{{variable}}}" (triple) instead of "{{variable}}" (double).