Comments (3)
Does that cause any problems for you? If it should be quoted, R CMD check
should be warning about it.
from roxygen2.
I mean it should NOT be quoted, but currently roxygen2 does quote it.
library(roxygen2) roc <- rd_roclet() out <- roc_proc_text(roc, " #' @name a #' @aliases \\%a\\% NULL")[[1]] roxygen2:::get_tag(out, 'alias')$values
The output is:
> roxygen2:::get_tag(out, 'alias')$values [1] "a" "\"\\%a\\%\""
from roxygen2.
here's a fix, in two patches:
patch1
--- roclet-namespace.R.orig 2011-08-29 23:52:59.648650390 +0200
+++ roclet-namespace.R 2011-09-01 19:25:54.228446954 +0200
@@ -182,9 +182,15 @@
unlist(lapply(matches, f, tag = tag, all = partitum), use.names = FALSE)
}
-words <- function(x) {
- quote_if_needed(str_split(str_trim(x), "\\s+")[[1]])
+words <- function(x, quote=TRUE) {
+ x.trimmed <- str_split(str_trim(x), "\\s+")[[1]]
+ if(isTRUE(quote)){
+ return(quote_if_needed(x.trimmed))
+ } else {
+ return(x.trimmed)
+ }
}
+
is.syntactic <- function(x) make.names(x) == x
has.quotes <- function(x) str_detect(x, "'|\"")
quote_if_needed <- function(x) {
patch2
--- roclet-rd.R.orig 2011-07-28 20:59:24.000000000 +0200
+++ roclet-rd.R 2011-09-01 19:27:26.976672899 +0200
@@ -333,7 +333,7 @@
add_tag(rd, process_description(partitum, base_path))
add_tag(rd, process_had_tag(partitum, 'aliases', function(tag, param) {
- new_tag('alias', words(param))
+ new_tag('alias', words(param, quote=FALSE))
}))
add_tag(rd, process.usage(partitum))
add_tag(rd, process.arguments(partitum))
from roxygen2.
Related Issues (20)
- examplesIf doesn't work when documenting the methods of an R6 class HOT 2
- Upkeep for roxygen2 (2023)
- Use standard argument checkers
- Uncaught 'warnings' in test suite HOT 2
- Tests failing at HEAD HOT 1
- Duplicate Seealso if using the @family tag for several elements documented in the same Rd with @rdname
- Switch `cli_warn()` to` cli_inform()`
- Implement `local_roxy_meta()`
- Don't change wd in `local_package_copy()`
- Some way to suppress method registration warning HOT 1
- Error while documenting withr HOT 1
- S3 diagnostics in subfolders
- Add a message when done
- Release roxygen2 7.3.0
- roxygen2 should return info about what's changed, or otherwise get a helper for this HOT 3
- Recommendation for re-running roxygenize() without re-loading code
- Consider removing the `pkg::` prefix in the `Super classes` section when parent classes originate from the same package
- Broken support for `#' @importFrom` with backticks not documented HOT 7
- multi-line @rawNamespace + @import directives lead to mangled NAMESPACE on re-run HOT 1
- Regression: โroxygen2โ 7.3.0 fails to parse name of S3 method for class `{` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roxygen2.