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

Generic roxygen 7.2.0 code blocks not rendered in pkgdown::build_site() #2092

Closed
jabenninghoff opened this issue May 22, 2022 · 2 comments · Fixed by #2094
Closed

Generic roxygen 7.2.0 code blocks not rendered in pkgdown::build_site() #2092

jabenninghoff opened this issue May 22, 2022 · 2 comments · Fixed by #2094
Labels
bug an unexpected problem or unintended behavior

Comments

@jabenninghoff
Copy link

jabenninghoff commented May 22, 2022

Generic roxygen 7.2.0 code blocks are not displayed in the function reference.

The Rd file, below, renders properly in help:

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{foo}
\alias{foo}
\title{Title}
\usage{
foo()
}
\description{
Title
}
\details{
Details

\if{html}{\out{<div class="sourceCode">}}\preformatted{1+1
}\if{html}{\out{</div>}}
}

but when rendering using pkgdown::build_site(), the preformatted section 1+1 is omitted in the html output (source).

Full reprex at: https://github.com/jabenninghoff/testpkg

@hadley
Copy link
Member

hadley commented May 25, 2022

@maelle can you take a look please? I think r-lib/roxygen2#1234 is likely to be the root cause.

@maelle maelle added the bug an unexpected problem or unintended behavior label May 26, 2022
@maelle
Copy link
Collaborator

maelle commented May 26, 2022

Good catch @jabenninghoff, thank you! (and wonderful to have a reprex to clone) I opened #2094.

I'm sure past me had a good reason to open that roxygen2 issue as it makes things more consistent, but right now it only adds code here. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants