-
Notifications
You must be signed in to change notification settings - Fork 231
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
fix implementation of @slot #84
Comments
the following seems to improve the situation (applied to the S4 branch), but i still get wierd errors, e.g. when trying to roxygenize() the XiMpLe package. --- a/R/rd-tag-api.R
+++ b/R/rd-tag-api.R
@@ -33,7 +33,11 @@
}
#' @S3method format rd_tag
-format.rd_tag <- function(x, ...) stop("Unimplemented format")
+format.rd_tag <- function(x, ...) {
+ # somehow this gets triggered for format.slot_tag,
+ # this is only a workaround...
+ if(length(class(x)) == 1) stop("Unimplemented format")
+}
#' @S3method merge rd_tag
merge.rd_tag <- function(x, y, ...) {
@@ -126,11 +130,11 @@
#' @S3method format slot_tag
format.slot_tag <- function(x, ...) {
names <- names(x$values)
- items <- str_c("\\item{", names, "}{", x$values, "}", collapse = "\n\n")
- str_c("\\section{Slots}\n\n",
- "\\itemize{\n",
+ items <- str_c("\\item{\\code{", names, "}:}{", x$values, "}", collapse = "\n\n")
+ str_c("\\section{Slots}{\n\n",
+ "\\describe{\n",
str_wrap(items, width = 60, exdent = 2, indent = 2),
- "\n}\n")
+ "\n}}\n")
} |
See #85 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current implementation of @slot does not pass the Rd checks, primarily because
\section{Slots}
should become\section{Slots}{...}
. Some other improvementsare possible as well.
Current (erroneous) form
could become
The text was updated successfully, but these errors were encountered: