Skip to content
New issue

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

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

Already on GitHub? # to your account

Update tidy eval template #1445

Merged
merged 9 commits into from
Sep 29, 2021
Merged

Update tidy eval template #1445

merged 9 commits into from
Sep 29, 2021

Conversation

lionel-
Copy link
Member

@lionel- lionel- commented May 10, 2021

Fixes r-lib/rlang#1008.

  • Remove more advanced helpers.
  • Mention modern syntax.
  • Add examples.

@lionel-
Copy link
Member Author

lionel- commented May 10, 2021

The {{ syntax conflicts with whiskers. Not sure how to solve this. Should we add an argument to use_template() to bypass render_template()?

@malcolmbarrett
Copy link
Collaborator

A trick that I've used to get around that is to treat {{ and }} like data, e.g. use {{{ curly_open }}} in the template, then data = list(curly_open = "{{") in use_template().

Copy link
Member

@jennybc jennybc left a comment

Choose a reason for hiding this comment

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

I'll think about how to handle the clash between the content of this template and whisker. This template does not actually use whisker, so it's sort of sad that they are in tension.

Since the new template uses markdown syntax, I think use_tidy_eval() also needs to gain some logic to make sure the host package is using markdown with roxygen2.

Co-authored-by: Jennifer (Jenny) Bryan <jenny.f.bryan@gmail.com>
@lionel-
Copy link
Member Author

lionel- commented May 11, 2021

I'll think about how to handle the clash between the content of this template and whisker. This template does not actually use whisker, so it's sort of sad that they are in tension.

Thanks!

Since the new template uses markdown syntax, I think use_tidy_eval() also needs to gain some logic to make sure the host package is using markdown with roxygen2.

IIUC this is taken care of by the @md tag which enables markdown in single topic pages.

@jennybc
Copy link
Member

jennybc commented May 11, 2021

IIUC this is taken care of by the @md tag which enables markdown in single topic pages.

But I think the host package still needs to have Roxygen: list(markdown = TRUE) in DESCRIPTION, yeah?

@jennybc
Copy link
Member

jennybc commented Sep 29, 2021

Based on a small experiment, my concern about needing Roxygen: list(markdown = TRUE) doesn't seem to be warranted.

@jennybc jennybc merged commit 8e21fdc into master Sep 29, 2021
@jennybc jennybc deleted the fix-tidy-eval-template branch September 29, 2021 22:05
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update use_tidy_eval() template
3 participants