ropensci / postdoc

Simple HTML package documentation
Other
12 stars 1 forks source link

Manual includes functions marked with `@internal` #2

Closed Bisaloo closed 1 year ago

Bisaloo commented 1 year ago

As can be seen on the finalsize package page, the HTML manual produced by postdoc includes functions marked with @internal (in this example, .solve_iterative(), .solve_newton()) while the PDF manual does not.

I want to highlight that this can be a valid choice. pkgdown for example includes internal functions as long as they are not marked with @noRd, i.e., as long as they have a page in man/. However, if you want to match exactly the behaviour of the PDF manual, for adoption by CRAN for example, this should probably be updated.

jeroen commented 1 year ago

Thanks! I was completely unaware that there is such a thing as internal documentation. I think we should try to match the pdf manual as much as possible.

Is this solely based on \keyword{internal} or on the fact that there no exported functions that reference this manual? 🤔

nfultz commented 1 year ago

Looks like just a regex

https://github.com/wch/r-source/blob/b12ffba7584825d6b11bba8b7dbad084a74c1c20/src/library/tools/R/Rd2pdf.R#L109

It's controlled by a cli flag -

https://github.com/wch/r-source/blob/b12ffba7584825d6b11bba8b7dbad084a74c1c20/src/library/tools/R/Rd2pdf.R#L714

jeroen commented 1 year ago

Thanks! I think it is fixed now (hopefully no weird side effects, Rd is a mess)