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

Linking to the 'OR' (bash pipe) operator '|' inside a markdown table #1668

Open
MichaelChirico opened this issue Oct 13, 2024 · 0 comments
Open

Comments

@MichaelChirico
Copy link
Contributor

MichaelChirico commented Oct 13, 2024

I am trying to translate this \tabular{} entry to {roxygen2}+markdown:

https://github.com/r-lib/bit64/blob/d783d635b95f66191de503fc4a49eee8298c953e/man/bit64-package.Rd#L270

As of now I don't think it's possible using a markdown table. Crucially, the | in this context wants to be interpreted as the markdown table column separator |.

Claude (the other LLMs I've tried are much worse for this domain) suggests replacing | with its HTML-markup equivalent |. That partially works (roxygen manages to correctly do \link[=|.integer64]), but the &; code gets translated through to the Rd.

This StackOverflow Q&A suggests just escaping \|, which is the best so far, but still results in an inexact translation (in the Rd output, the | should not be escaped:

#' | [`\|.integer64`][xor.integer64] | [`\|`][base::Logic] | |
   \code{\link[=xor.integer64]{\|.integer64}} \tab \code{\link[base:Logic]{\|}} \tab  \cr

That \ does translate through to the Rd/HTML output.

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

1 participant