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

\dots is being in-properly rendered in html manual #1114

Closed
jangorecki opened this issue Aug 26, 2019 · 5 comments
Closed

\dots is being in-properly rendered in html manual #1114

jangorecki opened this issue Aug 26, 2019 · 5 comments
Labels
bug an unexpected problem or unintended behavior rd-translation 🎏
Milestone

Comments

@jangorecki
Copy link

jangorecki commented Aug 26, 2019

When having a function definition in Rd file that uses \dots instead of ...

\usage{
as.myclass(x, \dots)
}

then pkgdown will in-properly rendered html manual
As a result html provide such a chunk of code:

as.myclass(x, …)

where it should be

as.myclass(x, ...)

According to WRE one should use \dots instead of ....

using pkgdown 1.3.0.9100

@jangorecki
Copy link
Author

jangorecki commented Aug 26, 2019

same in examples section, code from examples of form

dcast(DT, \dots ~ v3, value.var = "v4")

produces

dcast(DT, 
#> Error: <text>:31:0: unexpected end of input
#> 29:                  v4 = rnorm(6))
#> 30: dcast(DT, 
#>    ^
# NOT RUN {
…
# }
 ~ v3, value.var = "v4")

the same line processed by utils::make.packages.html looks fine:

dcast(DT, ... ~ v3, value.var = "v4")

@hadley hadley added bug an unexpected problem or unintended behavior rd-translation 🎏 labels Aug 26, 2019
@hadley hadley closed this as completed in 6f3b9d6 Aug 26, 2019
@jangorecki
Copy link
Author

Thanks for fast fix

@jangorecki
Copy link
Author

jangorecki commented Aug 27, 2019

@hadley Issue for usage in manual and descriptions is resolved, but not the one in examples, reported in second comment.
See https://jangorecki.gitlab.io/data.table/reference/dcast.data.table.html also confirmed locally on current pkgdown@master

@hadley hadley added this to the pkgdown 1.4 milestone Aug 27, 2019
@hadley
Copy link
Member

hadley commented Aug 27, 2019

Ah that's because of the mix of Rd and R code in the examples; and is probably related to #1087. Fixing it will probably require a rethink of how examples are parsed which I'm not sure I'll have time to do in this release cycle (so you may have to switch to using ..., which I don't think has any downsides.)

@hadley
Copy link
Member

hadley commented Aug 27, 2019

Having carefully read https://developer.r-project.org/parseRd.pdf, I'm closing this in favour of #1087 — the key problem is that I'm currently taking an ad-hoc approach to processing the examples, instead of accepting that they're fully capable of containing any Rd text formatting command.

@hadley hadley closed this as completed Aug 27, 2019
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 rd-translation 🎏
Projects
None yet
Development

No branches or pull requests

2 participants