Giter Club home page Giter Club logo

Comments (5)

hadley avatar hadley commented on June 28, 2024

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.

briandk avatar briandk commented on June 28, 2024

@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.

hadley avatar hadley commented on June 28, 2024

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.

briandk avatar briandk commented on June 28, 2024

@hadley - I'll get cracking on this and issue a pull request once the code is ready.

from roxygen2.

hadley avatar hadley commented on June 28, 2024

Fixed in 3c531eb

from roxygen2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.