klutometis/roxygen — pull request #58 by briandk (2011-11-05 18:16:00+00:00)
Title: Remove unused number.of.lines assignment.

This one should be a quick fix. In f17b53da44600d16360b4437cbc7388af6476e14 we streamlined the logic for `simulate_formatted_text()`, but I forgot to clear out all the old remnants:

```r
simulate_formatted_text <- function(field, value) {
text <- str_split(str_c(field, ": ", value), "\n")[[1]]
number.of.lines <- length(text) # This line doesn't do anything anymore
text[-1] <- str_c(" ", text[-1])

return(text)
}
```

The proposed patch removes the unused line and improves the assignment formatting so it's easier to see what's happening with `text[-1]`:

```r
simulate_formatted_text <- function(field, value) {
text <- str_split(str_c(field, ": ", value), "\n")[[1]]
text[-1] <- str_c(" ", text[-1]) # indents all *but* the first line

return(text)
}
```