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

Fix missing DCF code block on website #2635

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

IndrajeetPatil
Copy link
Collaborator

My guess is since knitr doesn't support DCF code blocks (cf. names(knitr::knit_engines$get())), pkgdown doesn't either.

  • Current status:

https://lintr.r-lib.org/dev/reference/read_settings.html

Screenshot 2024-07-24 at 07 31 33
  • With this PR (locally)
Screenshot 2024-07-24 at 07 31 51

@MichaelChirico
Copy link
Collaborator

Strange, I wouldn't have expected {knitr} to get involved here at all -- that's a pandoc/markdown code gate, IIUC {knitr} only considers ```{<engine> gates.

Possibly, the {pkgdown} rendering tool sees dcf as unrecognized & just fails to emit anything -- I wrote that expecting it would just ignore the language "hint" in this case (actually, I fully didn't expect any markdown renderer to have a specific DCF highlighter, just left it in as a hint in case one "eventually" shows up...)

@MichaelChirico
Copy link
Collaborator

Happy to accept the change, just wondering if this might be also reported with {pkgdown}?

Copy link
Collaborator

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

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

Or maybe it's the class="sourceCode dcf" part that's at fault? since that's already HTML, i.e. past markdown rendering already.

Also note that this is not a {knitr} thing at all IIUC, it's really {roxygen2}->HTML-in-Rd->rendered HTML-in-{pkgdown}.

So, possibly {roxygen2} should be vetting that? 🤔

@IndrajeetPatil
Copy link
Collaborator Author

You are right!

This is indeed seems to be coming via roxygen2.

Feel free to create an issue upstream if you wish. :)

@IndrajeetPatil IndrajeetPatil merged commit f2da882 into main Jul 24, 2024
18 checks passed
@IndrajeetPatil IndrajeetPatil deleted the fix-read-settings branch October 3, 2024 09:59
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