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

use litedown for rendering vignettes #6583

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

use litedown for rendering vignettes #6583

wants to merge 9 commits into from

Conversation

ben-schwen
Copy link
Member

Closes #6394

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.60%. Comparing base (200d657) to head (1f347bd).
Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6583   +/-   ##
=======================================
  Coverage   98.60%   98.60%           
=======================================
  Files          79       79           
  Lines       14516    14516           
=======================================
  Hits        14314    14314           
  Misses        202      202           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ben-schwen
Copy link
Member Author

ben-schwen commented Oct 20, 2024

This PR is on hold until current GH version of xfun makes its way to CRAN.

@MichaelChirico
Copy link
Member

Earmark: after #6589, if {knitr} is not in Suggests it should be in Enhances.

@MichaelChirico
Copy link
Member

NB: After #6618, we'll also want to check this issue whether it should be included, or left as a TODO: yihui/litedown#67

Copy link

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

NB: After #6618, we'll also want to check this issue whether it should be included, or left as a TODO: yihui/litedown#67

It's safe to use litedown:::.env$input with the current CRAN version of litedown. The next CRAN release should take place in a few weeks, and you'll be able to use litedown::get_input().

Comment on lines +19 to +22
opts = litedown::reactor()
opts$comment = "# "
opts$error = FALSE
opts$print = function(x, ...) capture.output(if (isS4(x)) methods::show(x, ...) else print(x, ...))
Copy link

Choose a reason for hiding this comment

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

error = FALSE will suppress errors in litedown, which is probably not what you want. I think you wanted the default error = NA instead, so there is no need to set it.

print = NA tells litedown to use R's default print function.

Suggested change
opts = litedown::reactor()
opts$comment = "# "
opts$error = FALSE
opts$print = function(x, ...) capture.output(if (isS4(x)) methods::show(x, ...) else print(x, ...))
litedown::reactor(comment = "# ", print = NA)

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.

Explore {litedown} for rendering vignettes
3 participants