Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of usage() that respects width and indent (#65) #66

Merged
merged 9 commits into from
Apr 23, 2017

Conversation

egnha
Copy link
Contributor

@egnha egnha commented Apr 23, 2017

Resolves #65.

  • Output is now bounded by width
  • New boolean argument indent.by.FUN toggles indentation by function-name + (
  • New string argument fail controls whether to generate a warning, stop, or continue silently, if the width constraint is unfulfillable (warning/stop message shows all overflowing lines)
  • Unit tests for usage() cover width and indentation behavior in several thousand cases, in addition to the behavior of the new arguments
  • In usage(), tidy_source() is replaced by tidy_usage()
  • Compared to the previous implementation, typical runtime is halved

Copy link
Owner

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is so awesome!

@yihui yihui merged commit 2e06286 into yihui:master Apr 23, 2017
@egnha egnha deleted the bug/line-length branch April 24, 2017 06:09
@egnha
Copy link
Contributor Author

egnha commented Apr 24, 2017

Thanks, happy to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants