Skip to content

Commit

Permalink
Refine void_tag() description (#1669)
Browse files Browse the repository at this point in the history
Slight change of language to say that functions generated by `void_tag()` error when given "child tags", rather than "unnamed tags".

I assign the copyright of this contribution to Hadley Wickham.
  • Loading branch information
jameslairdsmith committed Mar 19, 2023
1 parent 0614a73 commit 913df5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Translation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ i <- tag("i")
p("Some text. ", b(i("some bold italic text")), class = "mypara")
```

Before we generate functions for every possible HTML tag, we need to create a variant that handles void tags. `void_tag()` is quite similar to `tag()`, but it throws an error if there are any unnamed tags, and the tag itself looks a little different.
Before we generate functions for every possible HTML tag, we need to create a variant that handles void tags. `void_tag()` is quite similar to `tag()`, but it throws an error if there are any child tags, as captured by the unnamed dots. The tag itself also looks a little different.

```{r}
void_tag <- function(tag) {
Expand Down

0 comments on commit 913df5a

Please sign in to comment.