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

Process the output with downlit #367

Closed
krlmlr opened this issue Mar 13, 2021 · 3 comments
Closed

Process the output with downlit #367

krlmlr opened this issue Mar 13, 2021 · 3 comments
Labels
feature a feature request or enhancement venue 🏛

Comments

@krlmlr
Copy link
Member

krlmlr commented Mar 13, 2021

for formats that support it? This would provide clickable links for function calls and package names.

@jennybc
Copy link
Member

jennybc commented Mar 13, 2021

I thought there already was an issue for this, but apparently it existed only in my head (and in conversations with @hadley). Yes, it's an interesting idea!

@jennybc jennybc added feature a feature request or enhancement venue 🏛 labels Mar 13, 2021
@jennybc
Copy link
Member

jennybc commented Aug 16, 2022

Re-read this today.

I'm not convinced that applying downlit is a natural job for reprex. It feels more like a job for rmarkdown. And then reprex could find appropriate ways to take advantage of that.

It seems that rmarkdown has added downlit support for html_document(), which is currently not used by reprex.

https://github.com/rstudio/rmarkdown/blame/0e4f5781d54cb903f047eb7eb80425a3e6b28875/NEWS.md#L94

This is related to #384, which calls for a re-examination of how reprex exploits (or does not exploit) output formats maintained in rmarkdown.

I'm closing for now. It's a good idea, but currently would require way more work than I can invest. I would reconsider if rmarkdown added downlit support to a markdown-y output format which I could then adopt or modify.

@jennybc jennybc closed this as completed Aug 16, 2022
@jennybc
Copy link
Member

jennybc commented Aug 17, 2022

I note that downlit does already offer .md support:

https://downlit.r-lib.org/reference/downlit_md_path.html

This is still something that would have to be analyzed when doing major work on the output format, which is #384.

Note that downlit_md_path() takes .md as input, but it seems to (often?) output .html. Perhaps this is user error on my part but that's what I'm seeing when I run the output of reprex() through downlit, so perhaps this depends on the content of the .md input. Maybe something related to comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement venue 🏛
Projects
None yet
Development

No branches or pull requests

2 participants