xml2 icon indicating copy to clipboard operation
xml2 copied to clipboard

One `xml_text` example wasn't properly escaped

Open wkumler opened this issue 3 years ago • 0 comments

One xml_text example includes the following comment:

#' # xml_double() and xml_integer() are useful for extracting numeric attributes

However, this text was previously spread across two lines:

#' # xml_double() and xml_integer() are useful for extracting numeric 
#' attributes

with the second line missing the # in front of it. When these examples are run (i.e. in the reference docs), this extra text is treated as R code and run. Because attributes is an R function, the output is not what's intended:

# xml_double() and xml_integer() are useful for extracting numeric
attributes
#> function (x)  .Primitive("attributes")

This PR fixes this minor issue by simply moving the hanging word to the line above, which gives it a line length of exactly 80. An alternative solution if lines should be strictly less than 80 would be simply adding a new # in front of this line instead.

wkumler avatar May 10 '21 20:05 wkumler