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

Global option for markdown #515

Merged
merged 7 commits into from
Sep 22, 2016
Merged

Global option for markdown #515

merged 7 commits into from
Sep 22, 2016

Conversation

gaborcsardi
Copy link
Member

For #507

We read the options via the usual load_options() in roxygenize(), and then push them down the call chain (almost) everywhere. parse_text() also gets a global_options argument.

In each function where I added the global_options argument, I also added a default value (list()), so that we don't break other packages.

While this is done, and works, I don't think it is ideal. The best would be to attach the options to some package object, and make this reachable from block objects. Roxygen does not really have the organization to implement this cleanly, AFAICT.

Another option would be a global options store, but my problem with that is that it is hard to invalidate, and that these options really belong to the package and the blocks, not to roxygen itself.

* Most fields can now be written using Markdown markup instead of the
traditional Rd language. See the 'markdown' vignette for details
(#364, #431), by @gaborcsardi
(#364, #431, #499, #506, #507), by @gaborcsardi
Copy link
Member

Choose a reason for hiding this comment

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

Can you mention the global flag and @md/@noMd here too please?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, so here. :) GH email notifications lose the context sometimes.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, updated the NEWS.

@hadley
Copy link
Member

hadley commented Sep 22, 2016

I agree it's not the ideal approach but it works and doesn't need extensive changes to roxygen2. If you make that one change to NEWS.md, I'll merge

@gaborcsardi
Copy link
Member Author

Sure. You want another bullet point or in the same point?

On 22 Sep 2016 14:15, "Hadley Wickham" notifications@github.com wrote:

@hadley commented on this pull request.

In NEWS.md
#515 (review)
:

Can you mention the global flag and @md/@nomd here too please?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#515 (review),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoTQKr927Wm1IxSIyIJ0VQhvHEiOMFMks5qsn9qgaJpZM4KDaLE
.

@gaborcsardi
Copy link
Member Author

gaborcsardi commented Sep 22, 2016

Btw. I'll also update release a new version of desc tonight to get rid of the annoying Collate formatting and the trailing space craziness.

@hadley hadley merged commit fc65f1f into r-lib:master Sep 22, 2016
@hadley
Copy link
Member

hadley commented Sep 22, 2016

Thanks!

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