Skip to content

Commit 253e8be

Browse files
author
Ryan Patrick Kyle
committed
support arbitrary tags
1 parent bb897d3 commit 253e8be

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

R/utils.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,13 @@ generate_meta_tags <- function(metas) {
614614
has_charset <- any(vapply(metas, function(x)
615615
"charset" %in% names(x),
616616
logical(1)))
617-
617+
618+
# allow arbitrary tags with varying numbers of keys
618619
tags <- vapply(metas,
619-
function(tag) sprintf("<meta name=\"%s\" content=\"%s\">", tag$name, tag$content),
620+
function(tag) sprintf("<meta %s>", paste(sprintf("%s=\"%s\"",
621+
names(tag),
622+
unlist(tag, use.names = FALSE)),
623+
collapse=" ")),
620624
character(1))
621625

622626
if (!has_ie_compat) {

0 commit comments

Comments
 (0)