klutometis/roxygen — pull request #129 by krlmlr (2013-07-10 02:03:12+00:00)
Title: New syntax for preformatted chunks

This is an approach to support the `\preformatted` formatting in .Rd files for roxygen. Instead of attempting a semantic analysis (as suggested in #80), a new type of comment is defined to mark preformatted text.

```
#' This text will be wrapped
#' as usual.
#'
#''\preformat{This text stays as is
#''and will
#''not be wrapped.}
```

The preformatting is recorded using artificial `\r` markers, the text to be wrapped is later scanned for these delimiters and no wrapping occurs where these delimiters are found.

Both the formatting of the comment and the artificial delimiter character can be changed quite easily. A unit test is supplied.