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

Tidy filename Rd display from roxy_field_backref #493

Merged
merged 5 commits into from Sep 7, 2016
Merged

Conversation

@LiNk-NY
Copy link
Contributor

@LiNk-NY LiNk-NY commented Aug 8, 2016

When multiple files are referenced in one documentation page, they will run off the page.

This will create a one line per file format for the .Rd display. Example below:

cat(sprintf("%% Please edit in:\n%% %s\n",
      paste(c("a", "b", "c"), collapse = ",\n% ")))
@codecov-io
Copy link

@codecov-io codecov-io commented Aug 8, 2016

Current coverage is 83.13% (diff: 100%)

No coverage report found for master at 7133fd6.

Powered by Codecov. Last update 7133fd6...b02dc0a

@hadley
Copy link
Member

@hadley hadley commented Aug 29, 2016

I'd rather just wrap to (say) 80 characters

@LiNk-NY
Copy link
Contributor Author

@LiNk-NY LiNk-NY commented Aug 29, 2016

That works too

@hadley
Copy link
Member

@hadley hadley commented Aug 29, 2016

Do you want to have a go at implementing that?

@LiNk-NY
Copy link
Contributor Author

@LiNk-NY LiNk-NY commented Aug 30, 2016

Yes, should have it soon..

@LiNk-NY
Copy link
Contributor Author

@LiNk-NY LiNk-NY commented Aug 30, 2016

I didn't find an easy way to add "\n" to the output of strwrap. I ended up using paste twice. https://github.com/LiNk-NY/roxygen/blob/master/R/rd-tag-api.R#L97

@LiNk-NY
Copy link
Contributor Author

@LiNk-NY LiNk-NY commented Aug 31, 2016

Looks ready to go unless you have a more elegant way of adding "\n" to the end of a stri_wrap return

@LiNk-NY LiNk-NY changed the title Tidy filename Rd display from format.backref_tag Tidy filename Rd display from roxy_field_backref Sep 2, 2016
@hadley hadley merged commit 290bdf2 into r-lib:master Sep 7, 2016
3 checks passed
@hadley
Copy link
Member

@hadley hadley commented Sep 7, 2016

Thanks!

hadley added a commit that referenced this issue Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants