Added in-built slugify function (removes github slugify dependecy)
This commit is contained in:
@@ -18,9 +18,7 @@ The modified box
|
||||
}
|
||||
\description{
|
||||
The uri to load can have a replacement marker supplied '\%box\%' which will be
|
||||
substituded with a sanitized copy of the box title. Preference is given to
|
||||
the slugify package, however if unavailable a warning is generated and the
|
||||
fallback of URLEncode is used.
|
||||
substituded with a sanitized copy of the box title.
|
||||
}
|
||||
\examples{
|
||||
x <- shinydashboard::box(title = "This is a box")
|
||||
|
||||
33
man/htmlSlugify.Rd
Normal file
33
man/htmlSlugify.Rd
Normal file
@@ -0,0 +1,33 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/htmlSlugify.R
|
||||
\name{htmlSlugify}
|
||||
\alias{htmlSlugify}
|
||||
\title{Native(ish) R slugify}
|
||||
\usage{
|
||||
htmlSlugify(x, repl = "-", lower = TRUE)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{String to slugify}
|
||||
|
||||
\item{repl}{What to replace spaces with (default: -)}
|
||||
|
||||
\item{lower}{Lower case the output string}
|
||||
}
|
||||
\value{
|
||||
The slugified output string
|
||||
}
|
||||
\description{
|
||||
Native(ish) R slugify
|
||||
}
|
||||
\examples{
|
||||
x <- c(
|
||||
"A very short example",
|
||||
"This has a $ symbol",
|
||||
"user@example.com",
|
||||
"~~ABC123~~",
|
||||
"τυχαίος",
|
||||
"file:///tmp/some/path"
|
||||
)
|
||||
htmlSlugify(x)
|
||||
htmlSlugify(x, "_")
|
||||
}
|
||||
Reference in New Issue
Block a user