Browse Source

normalize params

tags/v0.3.0
Bob Rudis 8 years ago
parent
commit
6952d45b54
  1. 4
      R/response.r
  2. 5
      man/tidy_html.Rd

4
R/response.r

@ -1,9 +1,7 @@
#' @param encoding specify the encoding when tidying an \code{httr} \code{response}
#' object. Default to "\code{UTF-8}".
#' @export #' @export
#' @rdname tidy_html #' @rdname tidy_html
tidy_html.response <- function(content, options=list(TidyXhtmlOut=TRUE), tidy_html.response <- function(content, options=list(TidyXhtmlOut=TRUE),
verbose=FALSE, encoding="UTF-8") { verbose=FALSE) {
if (!grepl("html", content$headers[["content-type"]])) { if (!grepl("html", content$headers[["content-type"]])) {
stop("htmltidy only parses HTML content from httr::response objects", stop("htmltidy only parses HTML content from httr::response objects",

5
man/tidy_html.Rd

@ -12,7 +12,7 @@
\title{Tidy or "Pretty Print" HTML/XHTML Documents} \title{Tidy or "Pretty Print" HTML/XHTML Documents}
\usage{ \usage{
\method{tidy_html}{response}(content, options = list(TidyXhtmlOut = TRUE), \method{tidy_html}{response}(content, options = list(TidyXhtmlOut = TRUE),
verbose = FALSE, encoding = "UTF-8") verbose = FALSE)
tidy_html(content, options = list(TidyXhtmlOut = TRUE), verbose = FALSE) tidy_html(content, options = list(TidyXhtmlOut = TRUE), verbose = FALSE)
@ -41,9 +41,6 @@ or \code{XML} packages.}
\item{options}{named list of options} \item{options}{named list of options}
\item{verbose}{output document errors? (default: \code{FALSE})} \item{verbose}{output document errors? (default: \code{FALSE})}
\item{encoding}{specify the encoding when tidying an \code{httr} \code{response}
object. Default to "\code{UTF-8}".}
} }
\value{ \value{
Tidied HTML/XHTML content. The object type will be the same as that of the input type Tidied HTML/XHTML content. The object type will be the same as that of the input type

Loading…
Cancel
Save