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

Cell wrap #289

Closed
vincentarelbundock opened this issue Aug 12, 2024 · 3 comments
Closed

Cell wrap #289

vincentarelbundock opened this issue Aug 12, 2024 · 3 comments

Comments

@vincentarelbundock
Copy link
Collaborator

I tried to investigate this, but couldn't figure it out.

Why is the second column of the "Arguments" table not word-wrapped here?

https://grantmcdermott.com/tinyplot/man/tinyplot.html

@etiennebacher
Copy link
Owner

etiennebacher commented Aug 13, 2024

This was due to weird \verb{} tags in the Rd files that were caused by a typo in the original docs: grantmcdermott/tinyplot#200.

Closing since there's nothing to do on our side (except maybe reporting this weird case to roxygen2)

@etiennebacher etiennebacher closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2024
@etiennebacher
Copy link
Owner

etiennebacher commented Aug 13, 2024

Worth noting that this is likely not a bug in roxygen2. It seems that when the code in backticks is valid R code, it is wrapped in \code{} but if it's not it's wrapped in \verb{}:

### Valid R code
roxygen2::roc_proc_text(roxygen2::rd_roclet(), "
  #' @title Foo
  #' @param axes Some text: `1 + 1`
  foo <- function() {}
")
$foo.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in ./<text>
\name{foo}
\alias{foo}
\title{Foo}
\usage{
foo()
}
\arguments{
\item{axes}{Some text: \code{1 + 1}}
}
\description{
Foo
}
### Invalid R code
roxygen2::roc_proc_text(roxygen2::rd_roclet(), "
  #' @title Foo
  #' @param axes Some text: `1 1`
  foo <- function() {}
")
$foo.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in ./<text>
\name{foo}
\alias{foo}
\title{Foo}
\usage{
foo()
}
\arguments{
\item{axes}{Some text: \verb{1 1}}
}
\description{
Foo
}

@vincentarelbundock
Copy link
Collaborator Author

What a weird issue. And amazing investigation. Thanks for taking the time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants