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

Comments

@jangorecki
Copy link

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

This comment has been minimized.

Copy link
Author

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")
@jangorecki

This comment has been minimized.

Copy link
Author

commented Aug 27, 2019

Thanks for fast fix

@jangorecki

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Member

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 hadley reopened this Aug 27, 2019

@jangorecki jangorecki referenced this issue Aug 27, 2019
0 of 5 tasks complete
@hadley

This comment has been minimized.

Copy link
Member

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 Aug 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.