Comments (5)
Oh hmmm, this is because I roxygen formats the description file to eliminate long lines. I need some sort of check to see if you've done it yourself. Maybe we should check for line lengths > 80 and only wrap if that is true. You'll also notice this formatting in your depends and suggests fields.
from roxygen2.
@hadley I'm not quite up to speed on how the roclets work under the hood, but it appears DESCRIPTION-processing already checks for line lengths > 60 and wraps them.:
} else {
width <- if (individual_lines) 0 else 60
out <- strwrap(sprintf('%s: %s', field, value), exdent=4, width = width)
}
As a simple solution, maybe just make the default wrap width threshold more generous?
60 characters feels too conservative. 80 characters might be too conservative also, though 80 is (I think) standard from old-style monitors. Maybe 80, 100, 120 or 140? I'd be happy to start a pull request, if you'd like. Just let me know.
from roxygen2.
I think the best solution would be to check if the line width is greater than some threshold, and only wrap if necessary. I think you're right that we should make the default wrapping a little more generous - I think 80 is standard. A patch (with tests) would be highly appreciated.
from roxygen2.
@hadley - I'll get cracking on this and issue a pull request once the code is ready.
from roxygen2.
Fixed in 3c531eb
from roxygen2.
Related Issues (20)
- Consider removing the `pkg::` prefix in the `Super classes` section when parent classes originate from the same package
- Broken support for `#' @importFrom` with backticks not documented HOT 7
- multi-line @rawNamespace + @import directives lead to mangled NAMESPACE on re-run HOT 1
- Regression: โroxygen2โ 7.3.0 fails to parse name of S3 method for class `{` HOT 2
- Release roxygen2 7.3.1
- Lost braces
- Autolinking with markdown functions does not produce the correct .Rd
- Obscure error "bad value" from leadingSpaces() HOT 2
- Drop 'if getRversion() >= "3.4.0"' qualification under examplesIf tag?
- roxygen2::roxygenize() trying to process too many files HOT 2
- Ability to use `inherit` to import contents but not overwrite
- S3 diagnostics suggests correction with typo
- don't use error cli output for 'skipping' entries
- `@export` all.equal S3 method error HOT 1
- Person declared as maintainer and author in DESCRIPTION loses author assignment in pkgname-package.Rd
- roxygenize error: "Caused by error in `basename()`: a character vector argument expected" HOT 6
- Typos: @exportS3method -> @exportS3Method HOT 1
- Consider checking @export or @exportS3method tags only for exported objects HOT 9
- Checking for missing S3 method exports hangs "forever" if you have large data objects in the package HOT 1
- @include tag does not handle line breaks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roxygen2.