r-lib / roxygen2

Generate R package documentation from inline R comments
https://roxygen2.r-lib.org
Other
588 stars 231 forks source link

Look into bad HTML generation for R6 methods #1371

Closed hadley closed 2 years ago

hadley commented 2 years ago

From Kurt:

  GauPro D2MCS DoubleML poems

we get Rd files containing

***********************************************************
\if{html}{\out{
<details open><summary>Inherited methods</summary>
<ul>
</ul>
</details>
}}
***********************************************************

apparently from

  c("\\if{html}{\\out{", details,
    "<ul>",
    sprintf(
      paste0(
        "<li>",
        "<span class=\"pkg-link\" data-pkg=\"%s\" data-topic=\"%s\" data-id=\"%s\">",
        "<a href='../../%s/html/%s.html#method-%s-%s'><code>%s::%s$%s()</code></a>",
        "</span>",
        "</li>"
      ),
      super_meth$package,
      super_meth$classname,
      super_meth$name,
      super_meth$package,
      super_meth$classname,
      super_meth$classname,
      super_meth$name,
      super_meth$package,
      super_meth$classname,
      super_meth$name
    ),
    "</ul>",
    "</details>",
    "}}"
  )

in rd-r6.R when super_meth is empty? Not sure whether this is a problem in the packages? Btw, the current CRAN versions have

@gaborcsardi would you mind taking a look?

gaborcsardi commented 2 years ago

Reprex in poems, in GenericModel.Rd.