Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Uses `gsub()` for simple string replacements and adds a `re_replace_all()` helper for function-based replacements used in `package_url_parse()`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Note that `strsplit("", pattern)` returns `character(0)` unlike
stringr's `str_split()` which returns `""`, so `tag_words()` now
guards against empty input before splitting.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Uses `substring()` where vectorization over start/end is needed, and `substr()` for scalar operations. The replacement form `str_sub(x, s, e) <- val` is replaced with manual string concatenation since `substr<-` doesn't change string length. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Uses `regmatches()` + `regexec()` for `str_match()` and `regmatches()` + `gregexec()` for `str_match_all()`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removes `@import stringr` and stringr from DESCRIPTION Imports. Updates tests to use `fixed = TRUE` argument instead of stringr's `fixed()` wrapper. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
I think this is worth doing? It removes stringr from the devtools dependency tree ( |
gaborcsardi
left a comment
There was a problem hiding this comment.
Left some minor comments and questions.
| "(?<=[^\\]\\\\]|^)", | ||
| "\\[([^\\]\\[]+)\\]", | ||
| "(?:\\[([^\\]\\[]+)\\])?", | ||
| "(?=[^\\[{]|$)" |
There was a problem hiding this comment.
I think we can keep the comments here, no? (?x) should be extended mode in PERL regexes, so the comments are allowed? Or we could keep them as R comments?
| } | ||
|
|
||
| generic <- str_split(x$val, "::")[[1]] | ||
| generic <- str_split_half(x$val, "::") |
There was a problem hiding this comment.
This seems like an improvement, but nevertheless it is a change of behavior, no?
| n <- str_count(x$raw, "\\s+") | ||
| if (n > 1) { | ||
| warn_roxy_tag(x, "must have only one argument, not {n}") | ||
| warn_roxy_tag(x, "must have only one argument, not {n + 1}") |
There was a problem hiding this comment.
Why is this change needed? It seems to break a snapshot test.
There was a problem hiding this comment.
It was a mistake that I discovered. I must've forgotten to update the snapshot.
No description provided.